home *** CD-ROM | disk | FTP | other *** search
/ HTBasic 9.3 / HTBasic 9.3.iso / SICL / data1.cab / sicl32 / vb / sicl4.bas
Encoding:
BASIC Source File  |  2001-03-02  |  116.3 KB  |  3,242 lines

  1. Attribute VB_Name = "Module2"
  2. ' Copyright 1992-1994 Hewlett-Packard Company.  All Rights Reserved.
  3. '
  4. ' This file defines constants, record types, and entry points
  5. ' for the HP Standard Instrument Control Library.  You need to
  6. ' add this file to each Visual BASIC project that uses the
  7. ' HP Standard Instrument Control Library.
  8.  
  9. ' Name of SICL DLL
  10.  
  11. #If Win16 Then
  12. Const conSiclDll$ = "SICL16.DLL"
  13. #Else
  14. Const conSiclDll$ = "SICL32.DLL"
  15. #End If
  16.  
  17. ' Support levels:
  18. Global Const I_SICL_REVISION = 39       ' HP SICL Revision 3.9
  19. Global Const I_SICL_LEVEL = 3           ' Support Level
  20.  
  21. ' Byte Ordering constants
  22. Global Const I_ORDER_LE = True
  23. Global Const I_ORDER_BE = False
  24.  
  25. ' Session types
  26. Global Const I_SESS_INTF = 1
  27. Global Const I_SESS_DEV = 2
  28. Global Const I_SESS_CMDR = 3
  29.  
  30. ' Interface Types
  31. Global Const I_INTF_NONE = 0
  32. Global Const I_INTF_GPIB = 1
  33. Global Const I_INTF_VXI = 2
  34. Global Const I_INTF_RS232 = 3
  35. Global Const I_INTF_GPIO = 4
  36. ' 5 is reserved -- don't use
  37. Global Const I_INTF_USRDEF = 6
  38. ' 7 is reserved -- don't use
  39. Global Const I_INTF_MSIB = 8
  40. Global Const I_INTF_LAN = 9
  41.  
  42. ' iread termination conditions
  43. Global Const I_TERM_MAXCNT = 1
  44. Global Const I_TERM_CHR = 2
  45. Global Const I_TERM_END = 4
  46. Global Const I_TERM_NON_BLOCKED = 8
  47.  
  48. ' ixtrig which values.
  49. Global Const I_TRIG_STD = &H1&
  50. Global Const I_TRIG_ALL = &HFFFFFFFF
  51. Global Const I_TRIG_TTL0 = &H1000&
  52. Global Const I_TRIG_TTL1 = &H2000&
  53. Global Const I_TRIG_TTL2 = &H4000&
  54. Global Const I_TRIG_TTL3 = &H8000&
  55. Global Const I_TRIG_TTL4 = &H10000
  56. Global Const I_TRIG_TTL5 = &H20000
  57. Global Const I_TRIG_TTL6 = &H40000
  58. Global Const I_TRIG_TTL7 = &H80000
  59. Global Const I_TRIG_ECL0 = &H100000
  60. Global Const I_TRIG_ECL1 = &H200000
  61. Global Const I_TRIG_ECL2 = &H400000
  62. Global Const I_TRIG_ECL3 = &H800000
  63. Global Const I_TRIG_EXT0 = &H1000000
  64. Global Const I_TRIG_EXT1 = &H2000000
  65. Global Const I_TRIG_EXT2 = &H4000000
  66. Global Const I_TRIG_EXT3 = &H8000000
  67. Global Const I_TRIG_CLK0 = &H10000000
  68. Global Const I_TRIG_CLK1 = &H20000000
  69. Global Const I_TRIG_CLK2 = &H40000000
  70. Global Const I_TRIG_CLK10 = &H80000000
  71. Global Const I_TRIG_CLK100 = &H800&
  72. Global Const I_TRIG_SERIAL_DTR = &H400&
  73. Global Const I_TRIG_SERIAL_RTS = &H200&
  74. Global Const I_TRIG_GPIO_CTL0 = &H100&
  75. Global Const I_TRIG_GPIO_CTL1 = &H80&
  76.  
  77. ' ihint values
  78. Global Const I_HINT_DONTCARE = 0
  79. Global Const I_HINT_USEDMA = 1
  80. Global Const I_HINT_USEPOLL = 2
  81. Global Const I_HINT_USEINTR = 3
  82. Global Const I_HINT_SYSTEM = 4
  83. Global Const I_HINT_IO = 5
  84.  
  85. ' isetintr values.  1-15 are interface independant.
  86. Global Const I_INTR_OFF = 0
  87. Global Const I_INTR_INTFACT = 1
  88. Global Const I_INTR_INTFDEACT = 2
  89. Global Const I_INTR_TRIG = 3
  90. Global Const I_INTR_STB = 4
  91. Global Const I_INTR_DEVCLR = 5
  92.  
  93. ' VXI Interrupts
  94. Global Const I_INTR_VXI_SIGNAL = 16
  95. Global Const I_INTR_VXI_SYSRESET = 17
  96. Global Const I_INTR_VXI_VME = 18
  97. Global Const I_INTR_VXI_LLOCK = 19
  98. Global Const I_INTR_VXI_UKNSIG = 20
  99. Global Const I_INTR_VXI_VMESYSFAIL = 21
  100. Global Const I_INTR_VME_IRQ1 = 22
  101. Global Const I_INTR_VME_IRQ2 = 23
  102. Global Const I_INTR_VME_IRQ3 = 24
  103. Global Const I_INTR_VME_IRQ4 = 25
  104. Global Const I_INTR_VME_IRQ5 = 26
  105. Global Const I_INTR_VME_IRQ6 = 27
  106. Global Const I_INTR_VME_IRQ7 = 28
  107. Global Const I_INTR_ANY_SIG = 29
  108.  
  109. ' GP-IB Interrupts
  110. Global Const I_INTR_GPIB_IFC = 16
  111. Global Const I_INTR_GPIB_PPOLLCONFIG = 17
  112. Global Const I_INTR_GPIB_REMLOC = 18
  113. Global Const I_INTR_GPIB_GET = 20
  114. Global Const I_INTR_GPIB_TLAC = 21
  115.  
  116. ' RS-232 Interrupts
  117. Global Const I_INTR_SERIAL_DAV = 16
  118. Global Const I_INTR_SERIAL_MSL = 17
  119. Global Const I_INTR_SERIAL_BREAK = 18
  120. Global Const I_INTR_SERIAL_ERROR = 19
  121. Global Const I_INTR_SERIAL_TEMT = 20
  122. Global Const I_INTR_SERIAL_MCL = 21
  123.  
  124. ' GP-IO Interrupts
  125. Global Const I_INTR_GPIO_EIR = 16
  126. Global Const I_INTR_GPIO_RDY = 17
  127.  
  128. ' MSIB Interrupts
  129. Global Const I_INTR_MSIB_END_RECEIVED = 22
  130. Global Const I_INTR_MSIB_LINK_BROKEN = 23
  131.  
  132. ' 32 maximum isetintr values
  133. Global Const I_INTR_MAX = 32
  134.  
  135. ' ivxibusstatus values
  136. Global Const I_VXI_BUS_TRIGGER = 0
  137. Global Const I_VXI_BUS_LADDR = 1
  138. Global Const I_VXI_BUS_SERVANT_AREA = 2
  139. Global Const I_VXI_BUS_NORMOP = 3
  140. Global Const I_VXI_BUS_CMDR_LADDR = 4
  141. Global Const I_VXI_BUS_MAN_ID = 5
  142. Global Const I_VXI_BUS_MODEL_ID = 6
  143. Global Const I_VXI_BUS_PROTOCOL = 7
  144. Global Const I_VXI_BUS_XPROT = 8
  145. Global Const I_VXI_BUS_SHM_SIZE = 9
  146. Global Const I_VXI_BUS_SHM_ADDR_SPACE = 10
  147. Global Const I_VXI_SHM_PAGE = 11
  148. Global Const I_VXI_BUS_VXIMXI = 12
  149. Global Const I_VXI_BUS_TRIGSUPP = 13
  150.  
  151. ' igpibbusstatus values
  152. Global Const I_GPIB_BUS_REM = 1
  153. Global Const I_GPIB_BUS_SRQ = 2
  154. Global Const I_GPIB_BUS_NDAC = 3
  155. Global Const I_GPIB_BUS_SYSCTLR = 4
  156. Global Const I_GPIB_BUS_ACTCTLR = 5
  157. Global Const I_GPIB_BUS_TALKER = 6
  158. Global Const I_GPIB_BUS_LISTENER = 7
  159. Global Const I_GPIB_BUS_ADDR = 8
  160. Global Const I_GPIB_BUS_LINES = 9
  161.  
  162. Global Const I_GPIB_T1DELAY_MIN = 350
  163. Global Const I_GPIB_T1DELAY_MAX = 2400
  164.    
  165. ' values for igpioctrl and igpiostat
  166. Global Const I_GPIO_AUX = 1
  167. Global Const I_GPIO_CTRL = 2
  168. Global Const I_GPIO_DATA = 3
  169. Global Const I_GPIO_INFO = 4
  170. Global Const I_GPIO_SET_PCTL = 5
  171. Global Const I_GPIO_STAT = 6
  172. Global Const I_GPIO_READ_EOI = 7
  173. Global Const I_GPIO_TEST_ONLY = 8
  174. Global Const I_GPIO_POLARITY = 9
  175. Global Const I_GPIO_READ_CLK = 10
  176. Global Const I_GPIO_PCTL_DELAY = 11
  177.  
  178. Global Const I_GPIO_CTRL_CTL0 = &H1
  179. Global Const I_GPIO_CTRL_CTL1 = &H2
  180.  
  181. Global Const I_GPIO_STAT_STI0 = &H1
  182. Global Const I_GPIO_STAT_STI1 = &H2
  183. Global Const I_GPIO_EIR = &H4
  184. Global Const I_GPIO_PSTS = &H8
  185. Global Const I_GPIO_CHK_PSTS = &H10
  186. Global Const I_GPIO_AUTO_HDSK = &H20
  187. Global Const I_GPIO_ENH_MODE = &H40
  188. Global Const I_GPIO_READY = &H80
  189. Global Const I_GPIO_EOI_NONE = &H10000
  190.  
  191. ' RS-232 values
  192. Global Const I_SERIAL_BAUD = 1
  193. Global Const I_SERIAL_PARITY = 2
  194. Global Const I_SERIAL_STOP = 3
  195. Global Const I_SERIAL_WIDTH = 4
  196. Global Const I_SERIAL_FLOW_CTRL = 5
  197. Global Const I_SERIAL_MSL = 6
  198. Global Const I_SERIAL_STAT = 7
  199. Global Const I_SERIAL_RESET = 9
  200. Global Const I_SERIAL_READ_EOI = 10
  201. Global Const I_SERIAL_WRITE_EOI = 11
  202. Global Const I_SERIAL_DUPLEX = 12
  203. Global Const I_SERIAL_READ_BUFSZ = 13
  204. Global Const I_SERIAL_READ_DAV = 14
  205.  
  206. ' RS-232 duplex modes
  207. Global Const I_SERIAL_DUPLEX_HALF = 1
  208. Global Const I_SERIAL_DUPLEX_FULL = 2
  209.  
  210. ' RS-232 UART status
  211. Global Const I_SERIAL_DAV = &H1
  212. Global Const I_SERIAL_OVERFLOW = &H2
  213. Global Const I_SERIAL_PARERR = &H4
  214. Global Const I_SERIAL_FRAMING = &H8
  215. Global Const I_SERIAL_BREAK = &H10
  216. Global Const I_SERIAL_TEMT = &H20
  217.  
  218. ' RS-232 flow control
  219. Global Const I_SERIAL_FLOW_NONE = 0
  220. Global Const I_SERIAL_FLOW_XON = 1
  221. Global Const I_SERIAL_FLOW_RTS_CTS = 2
  222. Global Const I_SERIAL_FLOW_DTR_DSR = 3
  223.  
  224. ' RS-232 modem status lines
  225. Global Const I_SERIAL_DCD = &H1
  226. Global Const I_SERIAL_DSR = &H2
  227. Global Const I_SERIAL_CTS = &H4
  228. Global Const I_SERIAL_RI = &H8
  229. Global Const I_SERIAL_D_DCD = &H10
  230. Global Const I_SERIAL_D_DSR = &H20
  231. Global Const I_SERIAL_D_CTS = &H40
  232. Global Const I_SERIAL_D_TERI = &H80
  233.  
  234. ' RS-232 modem control lines
  235. Global Const I_SERIAL_RTS = &H1000
  236. Global Const I_SERIAL_DTR = &H2000
  237.  
  238. ' RS-232 parity values
  239. Global Const I_SERIAL_PAR_NONE = 0
  240. Global Const I_SERIAL_PAR_EVEN = 1
  241. Global Const I_SERIAL_PAR_ODD = 2
  242. Global Const I_SERIAL_PAR_MARK = 3
  243. Global Const I_SERIAL_PAR_SPACE = 4
  244. Global Const I_SERIAL_PAR_IGNORE = 5
  245.  
  246. ' RS-232 stop-bit values
  247. Global Const I_SERIAL_STOP_1 = 1
  248. Global Const I_SERIAL_STOP_2 = 2
  249.  
  250. ' RS-232 character width
  251. Global Const I_SERIAL_CHAR_5 = 5
  252. Global Const I_SERIAL_CHAR_6 = 6
  253. Global Const I_SERIAL_CHAR_7 = 7
  254. Global Const I_SERIAL_CHAR_8 = 8
  255.  
  256. ' EOI support (used with the I_SERIAL_*_EOI command)
  257. Global Const I_SERIAL_EOI_CHR = &H100
  258. Global Const I_SERIAL_EOI_NONE = &H200
  259. Global Const I_SERIAL_EOI_BIT8 = &H400
  260.  
  261.  
  262. ' MSIB error types (for imsibseterror)
  263. Global Const I_MSIB_PERMANENTERR = 0
  264. Global Const I_MSIB_TRANSIENTERR = 1
  265.  
  266. ' MSIB commands (for imsibcmd)
  267. Global Const I_MSIB_CMD_NULL = &H0
  268. Global Const I_MSIB_CMD_END = &H1
  269. Global Const I_MSIB_CMD_SEND_CAPABILITY = &H2
  270. Global Const I_MSIB_CMD_RETURN_TO_LOCAL = &H6
  271. Global Const I_MSIB_CMD_LOCK_LINK = &H7
  272. Global Const I_MSIB_CMD_UNLOCK_LINK = &H8
  273. Global Const I_MSIB_CMD_LIGHT_ACTIVE = &H9
  274. Global Const I_MSIB_CMD_UNLIGHT_ACTIVE = &HA
  275. Global Const I_MSIB_CMD_ERROR_OCCURRED = &HB
  276. Global Const I_MSIB_CMD_ERRORS_CLEARED = &HC
  277. Global Const I_MSIB_CMD_SEND_STATUS = &H10
  278. Global Const I_MSIB_CMD_SEND_ERRORS = &H11
  279. Global Const I_MSIB_CMD_SEND_MODULE_ID = &H12
  280. Global Const I_MSIB_CMD_SEND_MANUFACTURER = &H13
  281. Global Const I_MSIB_CMD_SEND_TIME = &H14
  282. Global Const I_MSIB_CMD_LINK_REMOTE = &H15
  283. Global Const I_MSIB_CMD_LINK_LOCAL = &H16
  284. Global Const I_MSIB_CMD_SEND_MODEL_NUMBER = &H17
  285. Global Const I_MSIB_CMD_SEND_SERIAL_NUMBER = &H18
  286. Global Const I_MSIB_CMD_SEND_FIRMWARE_REV = &H19
  287. Global Const I_MSIB_CMD_STATUS = &H600
  288. Global Const I_MSIB_CMD_SET_IEEE_ADDRESS = &H700
  289.  
  290. ' imap mapspace values
  291. Global Const I_MAP_A16 = &H0
  292. Global Const I_MAP_A24 = &H1
  293. Global Const I_MAP_A32 = &H2
  294. Global Const I_MAP_VXIDEV = &H3
  295. Global Const I_MAP_EXTEND = &H4
  296. Global Const I_MAP_INTFREG = &H5
  297. Global Const I_MAP_SHARED = &H6
  298.  
  299. ' Following is for icmd; uses Radisys define
  300. Global Const DOCMD_VALIDATE_MAPPING = &H40000005
  301.  
  302. ' Error Codes
  303. ' NOTE that User Error Codes 32501-32630 are reserved
  304. ' for HP SICL.
  305. Const SICL_ERR_BASE = 32501
  306.  
  307. Global Const I_ERR_NOERROR = 0
  308. Global Const I_ERR_SYNTAX = SICL_ERR_BASE
  309. Global Const I_ERR_SYMNAME = 1 + SICL_ERR_BASE
  310. Global Const I_ERR_BADADDR = 2 + SICL_ERR_BASE
  311. Global Const I_ERR_BADID = 3 + SICL_ERR_BASE
  312. Global Const I_ERR_PARAM = 4 + SICL_ERR_BASE
  313. Global Const I_ERR_NOCONN = 5 + SICL_ERR_BASE
  314. Global Const I_ERR_NOPERM = 6 + SICL_ERR_BASE
  315. Global Const I_ERR_NOTSUPP = 7 + SICL_ERR_BASE
  316. Global Const I_ERR_NORSRC = 8 + SICL_ERR_BASE
  317. Global Const I_ERR_NOINTF = 9 + SICL_ERR_BASE
  318. Global Const I_ERR_LOCKED = 10 + SICL_ERR_BASE
  319. Global Const I_ERR_NOLOCK = 11 + SICL_ERR_BASE
  320. Global Const I_ERR_BADFMT = 12 + SICL_ERR_BASE
  321. Global Const I_ERR_DATA = 13 + SICL_ERR_BASE
  322. Global Const I_ERR_TIMEOUT = 14 + SICL_ERR_BASE
  323. Global Const I_ERR_OVERFLOW = 15 + SICL_ERR_BASE
  324. Global Const I_ERR_IO = 16 + SICL_ERR_BASE
  325. Global Const I_ERR_OS = 17 + SICL_ERR_BASE
  326. Global Const I_ERR_BADMAP = 18 + SICL_ERR_BASE
  327. Global Const I_ERR_NODEV = 19 + SICL_ERR_BASE
  328. Global Const I_ERR_INVLADDR = 20 + SICL_ERR_BASE
  329. Global Const I_ERR_NOTIMPL = 21 + SICL_ERR_BASE
  330. Global Const I_ERR_ABORTED = 22 + SICL_ERR_BASE
  331. Global Const I_ERR_BADCONFIG = 23 + SICL_ERR_BASE
  332. Global Const I_ERR_NOCMDR = 24 + SICL_ERR_BASE
  333. Global Const I_ERR_VERSION = 25 + SICL_ERR_BASE
  334. Global Const I_ERR_NESTEDIO = 26 + SICL_ERR_BASE
  335. Global Const I_ERR_BUSY = 27 + SICL_ERR_BASE
  336. Global Const I_ERR_CONNEXISTS = 28 + SICL_ERR_BASE
  337. Global Const I_ERR_BUSERR = 29 + SICL_ERR_BASE
  338. Global Const I_ERR_BUSERR_RETRY = 30 + SICL_ERR_BASE
  339. Global Const I_ERR_INTERNAL = 127 + SICL_ERR_BASE
  340. Global Const I_ERR_INTERRUPT = 128 + SICL_ERR_BASE
  341. Global Const I_ERR_UNKNOWNERR = 129 + SICL_ERR_BASE
  342. Global Const SICL_ERR_LAST = I_ERR_UNKNOWNERR
  343.  
  344. Global Const I_READ_BUF_SZ = 4096
  345. Global Const I_WRITE_BUF_SZ = 128
  346.  
  347. Global Const I_BUF_READ = &H1
  348. Global Const I_BUF_WRITE = &H2
  349. Global Const I_BUF_DISCARD_READ = &H4
  350. Global Const I_BUF_DISCARD_WRITE = &H8
  351. Global Const I_BUF_WRITE_END = &H10
  352.  
  353. ' Data Types used by SICL
  354. Type lu_info
  355.   logical_unit As Long
  356.   symname As String * 32
  357.   cardname As String * 32
  358.   filler As Long
  359.   intftype As Long
  360.   location As Long
  361.   busaddr As Long
  362.   hwarg(0 To 15) As String * 20
  363.   visaname As String * 32
  364.   filler2(0 To 3) As Long
  365. End Type
  366.  
  367. Type vxiinfo
  368.   laddr As Integer
  369.   name As String * 16
  370.   manuf_name As String * 16
  371.   model_name As String * 16
  372.   man_id As Long
  373.   model As Long
  374.   devclass As Long
  375.   selftest As Integer
  376.   cage_num As Integer
  377.   slot As Integer
  378.   protocol As Long
  379.   x_protocol As Long
  380.   servant_area As Long
  381.   addrspace As Long
  382.   memsize As Long
  383.   memstart As Long
  384.   slot0_laddr As Integer
  385.   cmdr_laddr As Integer
  386.   int_handler(0 To 7)  As Integer
  387.   interrupter(0 To 7) As Integer
  388.   fill(0 To 9) As Integer
  389. End Type
  390.  
  391. #If Win16 Then
  392.     
  393. ' Version Information
  394. Declare Function vb_iversion Lib "vbsicl16.dll" (specversion As Integer, implversion As Integer) As Integer
  395. Declare Function vb_idrvrversion Lib "vbsicl16.dll" (ByVal id As Integer, specversion As Integer, implversion As Integer) As Integer
  396.  
  397. ' Open/Close
  398. Declare Function vb_iopen Lib "vbsicl16.dll" (ByVal addr As String) As Integer
  399. Declare Function vb_iclose Lib "vbsicl16.dll" (ByVal id As Integer) As Integer
  400. Declare Function vb_igetintfsess Lib "vbsicl16.dll" (ByVal id As Integer) As Integer
  401.  
  402. ' Write/Read
  403.  
  404. Declare Function vb_iwrite Lib "vbsicl16.dll" (ByVal which As Integer, ByVal id As Integer, ByVal buf As Variant, ByVal datalen As Long, ByVal endi As Integer, actual As Long) As Integer
  405. Declare Function vb_iread Lib "vbsicl16.dll" (ByVal which As Integer, ByVal id As Integer, buf As Variant, ByVal bufsize As Long, reason As Integer, actual As Long) As Integer
  406. Declare Function vb_itermchr Lib "vbsicl16.dll" (ByVal id As Integer, ByVal tchr As Integer) As Integer
  407. Declare Function vb_igettermchr Lib "vbsicl16.dll" (ByVal id As Integer, tchr As Integer) As Integer
  408.  
  409. ' Formatted I/O
  410. Declare Function vb_ivprintf Lib "vbsicl16.dll" (ByVal id As Integer, ByVal fmt As String, ByVal ap As Variant, ByVal lenBstr As Long) As Integer
  411. Declare Function vb_ivscanf Lib "vbsicl16.dll" (ByVal id As Integer, ByVal fmt As String, ByRef ap As Variant, ByVal lenBstr As Long) As Integer
  412. Declare Function vb_iflush Lib "vbsicl16.dll" (ByVal id As Integer, ByVal mask As Integer) As Integer
  413. Declare Function vb_isetbuf Lib "vbsicl16.dll" (ByVal id As Integer, ByVal mask As Integer, ByVal size As Integer) As Integer
  414.  
  415. ' Device/Interface Control
  416. Declare Function vb_iclear Lib "vbsicl16.dll" (ByVal id As Integer) As Integer
  417. Declare Function vb_ilocal Lib "vbsicl16.dll" (ByVal id As Integer) As Integer
  418. Declare Function vb_iremote Lib "vbsicl16.dll" (ByVal id As Integer) As Integer
  419. Declare Function vb_ireadstb Lib "vbsicl16.dll" (ByVal id As Integer, ByRef stb As Integer) As Integer
  420. Declare Function vb_itrigger Lib "vbsicl16.dll" (ByVal id As Integer) As Integer
  421. Declare Function vb_ixtrig Lib "vbsicl16.dll" (ByVal id As Integer, ByVal which As Long) As Integer
  422. Declare Function vb_ihint Lib "vbsicl16.dll" (ByVal id As Integer, ByVal hint As Integer) As Integer
  423.  
  424. ' Commander Sessions
  425. Declare Function vb_isetstb Lib "vbsicl16.dll" (ByVal id As Integer, ByVal stb As Byte) As Integer
  426.  
  427. ' Locking
  428. Declare Function vb_ilock Lib "vbsicl16.dll" (ByVal id As Integer) As Integer
  429. Declare Function vb_iunlock Lib "vbsicl16.dll" (ByVal id As Integer) As Integer
  430. Declare Function vb_isetlockwait Lib "vbsicl16.dll" (ByVal id As Integer, ByVal flag As Integer) As Integer
  431. Declare Function vb_igetlockwait Lib "vbsicl16.dll" (ByVal id As Integer, flag As Integer) As Integer
  432.  
  433. ' Timeouts
  434. Declare Function vb_itimeout Lib "vbsicl16.dll" (ByVal id As Integer, ByVal tval As Long) As Integer
  435. Declare Function vb_igettimeout Lib "vbsicl16.dll" (ByVal id As Integer, tval As Long) As Integer
  436.  
  437. ' Misc routines
  438. Declare Function vb_igetaddr Lib "vbsicl16.dll" (ByVal id As Integer, ByVal addr As String) As Integer
  439. Declare Function vb_igetintftype Lib "vbsicl16.dll" (ByVal id As Integer, pdata As Integer) As Integer
  440. Declare Function vb_igetsesstype Lib "vbsicl16.dll" (ByVal id As Integer, pdata As Integer) As Integer
  441. Declare Function vb_igetdevaddr Lib "vbsicl16.dll" (ByVal id As Integer, prim As Integer, sec As Integer) As Integer
  442. Declare Function vb_igetlu Lib "vbsicl16.dll" (ByVal id As Integer, lu As Integer) As Integer
  443. Declare Function vb_iswap Lib "vbsicl16.dll" (ByRef addr As Variant, ByVal length As Long, ByVal datasize As Integer) As Integer
  444. Declare Function vb_igetlulist Lib "vbsicl16.dll" (list() As Integer) As Integer
  445. Declare Function vb_igetluinfo Lib "vbsicl16.dll" (ByVal lu As Integer, result As lu_info) As Integer
  446. Declare Function vb_igetgatewaytype Lib "vbsicl16.dll" (ByVal id As Integer, pdata As Integer) As Integer
  447.  
  448. ' Error Handling
  449. Declare Function vb_igeterrno Lib "vbsicl16.dll" () As Integer
  450. Declare Function vb_iseterrno Lib "vbsicl16.dll" (ByVal id As Integer, ByVal Errno As Integer) As Integer
  451. Declare Function vb_igeterrstr Lib "vbsicl16.dll" (ByVal errcode As Integer, ByVal myerrstr As String) As Integer
  452. Declare Function vb_icauseerr Lib "vbsicl16.dll" (ByVal id As Integer, ByVal errcode As Integer, ByVal flag As Integer) As Integer
  453. Declare Function vbsetsiclerrbase Lib "vbsicl16.dll" (ByVal errbase As Integer) As Integer
  454.  
  455. ' RS-232 specific routines
  456. Declare Function vb_iserialmclctrl Lib "vbsicl16.dll" (ByVal id As Integer, ByVal sline As Integer, ByVal state As Integer) As Integer
  457. Declare Function vb_iserialmclstat Lib "vbsicl16.dll" (ByVal id As Integer, ByVal sline As Integer, state As Integer) As Integer
  458. Declare Function vb_iserialctrl Lib "vbsicl16.dll" (ByVal id As Integer, ByVal request As Integer, ByVal setting As Long) As Integer
  459. Declare Function vb_iserialstat Lib "vbsicl16.dll" (ByVal id As Integer, ByVal request As Integer, result As Long) As Integer
  460. Declare Function vb_iserialbreak Lib "vbsicl16.dll" (ByVal id As Integer) As Integer
  461.  
  462. ' VXI Specific routines
  463. Declare Function vb_ivxibusstatus Lib "vbsicl16.dll" (ByVal id As Integer, ByVal request As Integer, result As Long) As Integer
  464. Declare Function vb_ivxiwaitnormop Lib "vbsicl16.dll" (ByVal id As Integer) As Integer
  465. Declare Function vb_ivxitrigon Lib "vbsicl16.dll" (ByVal id As Integer, ByVal which As Long) As Integer
  466. Declare Function vb_ivxitrigoff Lib "vbsicl16.dll" (ByVal id As Integer, ByVal which As Long) As Integer
  467. Declare Function vb_ivxitrigroute Lib "vbsicl16.dll" (ByVal id As Integer, ByVal in_which As Long, ByVal out_which As Long) As Integer
  468. Declare Function vb_ivxigettrigroute Lib "vbsicl16.dll" (ByVal id As Integer, ByVal which As Long, route As Long) As Integer
  469. Declare Function vb_ivxiws Lib "vbsicl16.dll" (ByVal id As Integer, ByVal wscmd As Integer, wsresp As Integer, rpe As Integer) As Integer
  470. Declare Function vb_ivxiservants Lib "vbsicl16.dll" (ByVal id As Integer, ByVal maxnum As Integer, list() As Integer) As Integer
  471. Declare Function vb_ivxirminfo Lib "vbsicl16.dll" (ByVal id As Integer, ByVal laddr As Integer, ByRef info As vxiinfo) As Integer
  472.  
  473. ' GP-IB Specific Details
  474. Declare Function vb_igpibbusstatus Lib "vbsicl16.dll" (ByVal id As Integer, ByVal request As Integer, result As Integer) As Integer
  475. Declare Function vb_igpibppoll Lib "vbsicl16.dll" (ByVal id As Integer, result As Integer) As Integer
  476. Declare Function vb_igpibppollconfig Lib "vbsicl16.dll" (ByVal id As Integer, ByVal cval As Integer) As Integer
  477. Declare Function vb_igpibppollresp Lib "vbsicl16.dll" (ByVal id As Integer, ByVal sval As Integer) As Integer
  478. Declare Function vb_igpibpassctl Lib "vbsicl16.dll" (ByVal id As Integer, ByVal busaddr As Integer) As Integer
  479. Declare Function vb_igpibrenctl Lib "vbsicl16.dll" (ByVal id As Integer, ByVal ren As Integer) As Integer
  480. Declare Function vb_igpibatnctl Lib "vbsicl16.dll" (ByVal id As Integer, ByVal atnval As Integer) As Integer
  481. Declare Function vb_igpibsendcmd Lib "vbsicl16.dll" (ByVal id As Integer, ByVal buf As String, ByVal length As Integer) As Integer
  482. Declare Function vb_igpibllo Lib "vbsicl16.dll" (ByVal id As Integer) As Integer
  483. Declare Function vb_igpibbusaddr Lib "vbsicl16.dll" (ByVal id As Integer, ByVal busaddr As Integer) As Integer
  484. Declare Function vb_igpibgett1delay Lib "vbsicl16.dll" (ByVal id As Integer, delay As Integer) As Integer
  485. Declare Function vb_igpibsett1delay Lib "vbsicl16.dll" (ByVal id As Integer, ByVal delay As Integer) As Integer
  486. Declare Function vb_igpibpulseifc Lib "vbsicl16.dll" (ByVal id As Integer) As Integer
  487.  
  488. ' GPIO Specific routines
  489. Declare Function vb_igpioctrl Lib "vbsicl16.dll" (ByVal id As Integer, ByVal request As Integer, ByVal setting As Long) As Integer
  490. Declare Function vb_igpiostat Lib "vbsicl16.dll" (ByVal id As Integer, ByVal request As Integer, ByRef result As Long) As Integer
  491. Declare Function vb_igpiosetwidth Lib "vbsicl16.dll" (ByVal id As Integer, ByVal dwidth As Integer) As Integer
  492. Declare Function vb_igpiogetwidth Lib "vbsicl16.dll" (ByVal id As Integer, ByRef dwidth As Integer) As Integer
  493.  
  494. ' LAN Specific functions
  495. Declare Function vb_ilantimeout Lib "vbsicl16.dll" (ByVal id As Integer, ByVal tval As Long) As Integer
  496. Declare Function vb_ilangettimeout Lib "vbsicl16.dll" (ByVal id As Integer, tval As Long) As Integer
  497.  
  498. ' Map routines
  499. Declare Function vb_imap Lib "vbsicl16.dll" (ByVal id As Integer, ByVal mapspace As Integer, ByVal pagestart As Integer, ByVal pagecnt As Integer, ByVal suggested As Long) As Long
  500. Declare Function vb_iunmap Lib "vbsicl16.dll" (ByVal id As Integer, ByVal addr As Long, ByVal mapspace As Integer, ByVal pagestart As Integer, ByVal pagecnt As Integer) As Integer
  501. Declare Function vb_imapinfo Lib "vbsicl16.dll" (ByVal id As Integer, ByVal mapspace As Integer, numwindows As Integer, winsize As Integer) As Integer
  502.  
  503. ' Block copy and fifo routines
  504. Declare Function vb_ibblockcopy Lib "vbsicl16.dll" (ByVal id As Integer, ByVal src As Long, ByVal dest As Long, ByVal cnt As Long) As Integer
  505. Declare Function vb_iwblockcopy Lib "vbsicl16.dll" (ByVal id As Integer, ByVal src As Long, ByVal dest As Long, ByVal cnt As Long, ByVal swap As Integer) As Integer
  506. Declare Function vb_ilblockcopy Lib "vbsicl16.dll" (ByVal id As Integer, ByVal src As Long, ByVal dest As Long, ByVal cnt As Long, ByVal swap As Integer) As Integer
  507. Declare Function vb_ibpushfifo Lib "vbsicl16.dll" (ByVal id As Integer, ByVal src As Long, ByVal fifo As Long, ByVal cnt As Long) As Integer
  508. Declare Function vb_iwpushfifo Lib "vbsicl16.dll" (ByVal id As Integer, ByVal src As Long, ByVal fifo As Long, ByVal cnt As Long, ByVal swap As Integer) As Integer
  509. Declare Function vb_ilpushfifo Lib "vbsicl16.dll" (ByVal id As Integer, ByVal src As Long, ByVal fifo As Long, ByVal cnt As Long, ByVal swap As Integer) As Integer
  510. Declare Function vb_ibpopfifo Lib "vbsicl16.dll" (ByVal id As Integer, ByVal fifo As Long, ByVal dest As Long, ByVal cnt As Long) As Integer
  511. Declare Function vb_iwpopfifo Lib "vbsicl16.dll" (ByVal id As Integer, ByVal fifo As Long, ByVal dest As Long, ByVal cnt As Long, ByVal swap As Integer) As Integer
  512. Declare Function vb_ilpopfifo Lib "vbsicl16.dll" (ByVal id As Integer, ByVal fifo As Long, ByVal dest As Long, ByVal cnt As Long, ByVal swap As Integer) As Integer
  513. Declare Function vb_icmd Lib "vbsicl16.dll" (ByVal id As Integer, ByVal cmd As Long, ByVal datalen As Integer, ByVal datawidth As Integer, ByRef pdata As Long) As Integer
  514.  
  515. ' Windows 3.1 Cleanup routines
  516. Declare Function vb__siclcleanup Lib "vbsicl16.dll" () As Integer
  517.  
  518. ' Windows 3.1 yield control routine
  519. Declare Function vb__setsiclyield Lib "vbsicl16.dll" (ByVal yield_option As Integer) As Integer
  520.  
  521. ' Peek/Poke routines
  522. Declare Sub vb_ibpoke Lib "vbsicl16.dll" (ByVal addr As Long, ByVal value As Byte)
  523. Declare Sub vb_iwpoke Lib "vbsicl16.dll" (ByVal addr As Long, ByVal value As Integer)
  524. Declare Sub vb_ilpoke Lib "vbsicl16.dll" (ByVal addr As Long, ByVal value As Long)
  525. Declare Function vb_ibpeek Lib "vbsicl16.dll" (ByVal addr As Long) As Byte
  526. Declare Function vb_iwpeek Lib "vbsicl16.dll" (ByVal addr As Long) As Integer
  527. Declare Function vb_ilpeek Lib "vbsicl16.dll" (ByVal addr As Long) As Long
  528.  
  529. #Else
  530.  
  531. ' Version Information
  532.  
  533. Declare Function vb_iversion Lib "vbsicl32.dll" (specversion As Integer, implversion As Integer) As Integer
  534. Declare Function vb_idrvrversion Lib "vbsicl32.dll" (ByVal id As Integer, specversion As Integer, implversion As Integer) As Integer
  535.  
  536. ' Open/Close
  537. Declare Function vb_iopen Lib "vbsicl32.dll" (ByVal addr As String) As Integer
  538. Declare Function vb_iclose Lib "vbsicl32.dll" (ByVal id As Integer) As Integer
  539. Declare Function vb_igetintfsess Lib "vbsicl32.dll" (ByVal id As Integer) As Integer
  540.  
  541. ' Write/Read
  542.  
  543. Declare Function vb_iwrite Lib "vbsicl32.dll" (ByVal which As Integer, ByVal id As Integer, ByVal buf As Variant, ByVal datalen As Long, ByVal endi As Integer, actual As Long) As Integer
  544. Declare Function vb_iread Lib "vbsicl32.dll" (ByVal which As Integer, ByVal id As Integer, buf As Variant, ByVal bufsize As Long, reason As Integer, actual As Long) As Integer
  545. Declare Function vb_itermchr Lib "vbsicl32.dll" (ByVal id As Integer, ByVal tchr As Integer) As Integer
  546. Declare Function vb_igettermchr Lib "vbsicl32.dll" (ByVal id As Integer, tchr As Integer) As Integer
  547.  
  548. ' Formatted I/O
  549. Declare Function vb_iscan Lib "vbsicl32.dll" (ByVal which As Integer, ByVal id As Integer, ByVal s As String, ByVal fmt As String, ByRef va1 As Variant, ByRef va2 As Variant, ByRef va3 As Variant, ByRef va4 As Variant, ByRef va5 As Variant, ByRef va6 As Variant, ByRef va7 As Variant, ByRef va8 As Variant, ByRef va9 As Variant, ByRef va10 As Variant) As Integer
  550. Declare Function vb_iprint Lib "vbsicl32.dll" (ByVal which As Integer, ByVal id As Integer, ByVal s As String, ByVal fmt As String, ByRef ap() As Variant) As Integer
  551.  
  552. Declare Function vb_ivprintf Lib "vbsicl32.dll" (ByVal id As Integer, ByVal fmt As String, ByVal ap As Variant, ByVal lenBstr As Long) As Integer
  553. Declare Function vb_ivscanf Lib "vbsicl32.dll" (ByVal id As Integer, ByVal fmt As String, ByRef ap As Variant, ByVal lenBstr As Long) As Integer
  554. Declare Function vb_iflush Lib "vbsicl32.dll" (ByVal id As Integer, ByVal mask As Integer) As Integer
  555. Declare Function vb_isetbuf Lib "vbsicl32.dll" (ByVal id As Integer, ByVal mask As Integer, ByVal size As Integer) As Integer
  556.  
  557. ' Device/Interface Control
  558. Declare Function vb_iclear Lib "vbsicl32.dll" (ByVal id As Integer) As Integer
  559. Declare Function vb_ilocal Lib "vbsicl32.dll" (ByVal id As Integer) As Integer
  560. Declare Function vb_iremote Lib "vbsicl32.dll" (ByVal id As Integer) As Integer
  561. Declare Function vb_ireadstb Lib "vbsicl32.dll" (ByVal id As Integer, ByRef stb As Integer) As Integer
  562. Declare Function vb_itrigger Lib "vbsicl32.dll" (ByVal id As Integer) As Integer
  563. Declare Function vb_ixtrig Lib "vbsicl32.dll" (ByVal id As Integer, ByVal which As Long) As Integer
  564. Declare Function vb_ihint Lib "vbsicl32.dll" (ByVal id As Integer, ByVal hint As Integer) As Integer
  565.  
  566. ' Commander Sessions
  567. Declare Function vb_isetstb Lib "vbsicl32.dll" (ByVal id As Integer, ByVal stb As Byte) As Integer
  568.  
  569. ' Locking
  570. Declare Function vb_ilock Lib "vbsicl32.dll" (ByVal id As Integer) As Integer
  571. Declare Function vb_iunlock Lib "vbsicl32.dll" (ByVal id As Integer) As Integer
  572. Declare Function vb_isetlockwait Lib "vbsicl32.dll" (ByVal id As Integer, ByVal flag As Integer) As Integer
  573. Declare Function vb_igetlockwait Lib "vbsicl32.dll" (ByVal id As Integer, flag As Integer) As Integer
  574.  
  575. ' Timeouts
  576. Declare Function vb_itimeout Lib "vbsicl32.dll" (ByVal id As Integer, ByVal tval As Long) As Integer
  577. Declare Function vb_igettimeout Lib "vbsicl32.dll" (ByVal id As Integer, tval As Long) As Integer
  578.  
  579. ' Misc routines
  580. Declare Function vb_igetaddr Lib "vbsicl32.dll" (ByVal id As Integer, ByVal addr As String) As Integer
  581. Declare Function vb_igetintftype Lib "vbsicl32.dll" (ByVal id As Integer, pdata As Integer) As Integer
  582. Declare Function vb_igetsesstype Lib "vbsicl32.dll" (ByVal id As Integer, pdata As Integer) As Integer
  583. Declare Function vb_igetdevaddr Lib "vbsicl32.dll" (ByVal id As Integer, prim As Integer, sec As Integer) As Integer
  584. Declare Function vb_igetlu Lib "vbsicl32.dll" (ByVal id As Integer, lu As Integer) As Integer
  585. Declare Function vb_iswap Lib "vbsicl32.dll" (ByRef addr As Variant, ByVal length As Long, ByVal datasize As Integer) As Integer
  586. Declare Function vb_igetlulist Lib "vbsicl32.dll" (list() As Integer) As Integer
  587. Declare Function vb_igetluinfo Lib "vbsicl32.dll" (ByVal lu As Integer, result As lu_info) As Integer
  588. Declare Function vb_igetgatewaytype Lib "vbsicl32.dll" (ByVal id As Integer, pdata As Integer) As Integer
  589.  
  590.  
  591. ' Error Handling
  592. Declare Function vb_igeterrno Lib "vbsicl32.dll" () As Integer
  593. Declare Function vb_iseterrno Lib "vbsicl32.dll" (ByVal id As Integer, ByVal xint As Integer) As Integer
  594. Declare Function vb_igeterrstr Lib "vbsicl32.dll" (ByVal errcode As Integer, ByVal myerrstr As String) As Integer
  595. Declare Function vb_icauseerr Lib "vbsicl32.dll" (ByVal id As Integer, ByVal errcode As Integer, ByVal flag As Integer) As Integer
  596. Declare Function vbsetsiclerrbase Lib "vbsicl32.dll" (ByVal errbase As Integer) As Integer
  597.  
  598. ' RS-232 specific routines
  599. Declare Function vb_iserialmclctrl Lib "vbsicl32.dll" (ByVal id As Integer, ByVal sline As Integer, ByVal state As Integer) As Integer
  600. Declare Function vb_iserialmclstat Lib "vbsicl32.dll" (ByVal id As Integer, ByVal sline As Integer, state As Integer) As Integer
  601. Declare Function vb_iserialctrl Lib "vbsicl32.dll" (ByVal id As Integer, ByVal request As Integer, ByVal setting As Long) As Integer
  602. Declare Function vb_iserialstat Lib "vbsicl32.dll" (ByVal id As Integer, ByVal request As Integer, result As Long) As Integer
  603. Declare Function vb_iserialbreak Lib "vbsicl32.dll" (ByVal id As Integer) As Integer
  604.  
  605. ' VXI Specific routines
  606. Declare Function vb_ivxibusstatus Lib "vbsicl32.dll" (ByVal id As Integer, ByVal request As Integer, result As Long) As Integer
  607. Declare Function vb_ivxiwaitnormop Lib "vbsicl32.dll" (ByVal id As Integer) As Integer
  608. Declare Function vb_ivxitrigon Lib "vbsicl32.dll" (ByVal id As Integer, ByVal which As Long) As Integer
  609. Declare Function vb_ivxitrigoff Lib "vbsicl32.dll" (ByVal id As Integer, ByVal which As Long) As Integer
  610. Declare Function vb_ivxitrigroute Lib "vbsicl32.dll" (ByVal id As Integer, ByVal in_which As Long, ByVal out_which As Long) As Integer
  611. Declare Function vb_ivxigettrigroute Lib "vbsicl32.dll" (ByVal id As Integer, ByVal which As Long, route As Long) As Integer
  612. Declare Function vb_ivxiws Lib "vbsicl32.dll" (ByVal id As Integer, ByVal wscmd As Integer, wsresp As Integer, rpe As Integer) As Integer
  613. Declare Function vb_ivxiservants Lib "vbsicl32.dll" (ByVal id As Integer, ByVal maxnum As Integer, list() As Integer) As Integer
  614. Declare Function vb_ivxirminfo Lib "vbsicl32.dll" (ByVal id As Integer, ByVal laddr As Integer, ByRef info As vxiinfo) As Integer
  615.  
  616. ' GP-IB Specific Details
  617. Declare Function vb_igpibbusstatus Lib "vbsicl32.dll" (ByVal id As Integer, ByVal request As Integer, result As Integer) As Integer
  618. Declare Function vb_igpibppoll Lib "vbsicl32.dll" (ByVal id As Integer, result As Integer) As Integer
  619. Declare Function vb_igpibppollconfig Lib "vbsicl32.dll" (ByVal id As Integer, ByVal cval As Integer) As Integer
  620. Declare Function vb_igpibppollresp Lib "vbsicl32.dll" (ByVal id As Integer, ByVal sval As Integer) As Integer
  621. Declare Function vb_igpibpassctl Lib "vbsicl32.dll" (ByVal id As Integer, ByVal busaddr As Integer) As Integer
  622. Declare Function vb_igpibrenctl Lib "vbsicl32.dll" (ByVal id As Integer, ByVal ren As Integer) As Integer
  623. Declare Function vb_igpibatnctl Lib "vbsicl32.dll" (ByVal id As Integer, ByVal atnval As Integer) As Integer
  624. Declare Function vb_igpibsendcmd Lib "vbsicl32.dll" (ByVal id As Integer, ByVal buf As String, ByVal length As Integer) As Integer
  625. Declare Function vb_igpibllo Lib "vbsicl32.dll" (ByVal id As Integer) As Integer
  626. Declare Function vb_igpibbusaddr Lib "vbsicl32.dll" (ByVal id As Integer, ByVal busaddr As Integer) As Integer
  627. Declare Function vb_igpibgett1delay Lib "vbsicl32.dll" (ByVal id As Integer, delay As Integer) As Integer
  628. Declare Function vb_igpibsett1delay Lib "vbsicl32.dll" (ByVal id As Integer, ByVal delay As Integer) As Integer
  629. Declare Function vb_igpibpulseifc Lib "vbsicl32.dll" (ByVal id As Integer) As Integer
  630.  
  631. ' GPIO Specific routines
  632. Declare Function vb_igpioctrl Lib "vbsicl32.dll" (ByVal id As Integer, ByVal request As Integer, ByVal setting As Long) As Integer
  633. Declare Function vb_igpiostat Lib "vbsicl32.dll" (ByVal id As Integer, ByVal request As Integer, ByRef result As Long) As Integer
  634. Declare Function vb_igpiosetwidth Lib "vbsicl32.dll" (ByVal id As Integer, ByVal dwidth As Integer) As Integer
  635. Declare Function vb_igpiogetwidth Lib "vbsicl32.dll" (ByVal id As Integer, ByRef dwidth As Integer) As Integer
  636.  
  637. ' LAN Specific functions
  638. Declare Function vb_ilantimeout Lib "vbsicl32.dll" (ByVal id As Integer, ByVal tval As Long) As Integer
  639. Declare Function vb_ilangettimeout Lib "vbsicl32.dll" (ByVal id As Integer, tval As Long) As Integer
  640.  
  641. ' Map routines
  642. Declare Function vb_imap Lib "vbsicl32.dll" (ByVal id As Integer, ByVal mapspace As Integer, ByVal pagestart As Integer, ByVal pagecnt As Integer, ByVal suggested As Long) As Long
  643. Declare Function vb_iunmap Lib "vbsicl32.dll" (ByVal id As Integer, ByVal addr As Long, ByVal mapspace As Integer, ByVal pagestart As Integer, ByVal pagecnt As Integer) As Integer
  644. Declare Function vb_imapx Lib "vbsicl32.dll" (ByVal id As Integer, ByVal mapspace As Integer, ByVal pagestart As Integer, ByVal pagecnt As Integer) As Long
  645. Declare Function vb_iunmapx Lib "vbsicl32.dll" (ByVal id As Integer, ByVal addr As Long, ByVal mapspace As Integer, ByVal pagestart As Integer, ByVal pagecnt As Integer) As Integer
  646. Declare Function vb_imapinfo Lib "vbsicl32.dll" (ByVal id As Integer, ByVal mapspace As Integer, numwindows As Integer, winsize As Integer) As Integer
  647.  
  648. ' peekx/pokex/blockmovex routines
  649. Declare Function vb_ipokex8 Lib "vbsicl32.dll" (ByVal id As Integer, ByVal handle As Long, ByVal offset As Long, ByVal value As Byte) As Integer
  650. Declare Function vb_ipokex16 Lib "vbsicl32.dll" (ByVal id As Integer, ByVal handle As Long, ByVal offset As Long, ByVal value As Integer) As Integer
  651. Declare Function vb_ipokex32 Lib "vbsicl32.dll" (ByVal id As Integer, ByVal handle As Long, ByVal offset As Long, ByVal value As Long) As Integer
  652. Declare Function vb_ipeekx8 Lib "vbsicl32.dll" (ByVal id As Integer, ByVal handle As Long, ByVal offset As Long, value As Byte) As Integer
  653. Declare Function vb_ipeekx16 Lib "vbsicl32.dll" (ByVal id As Integer, ByVal handle As Long, ByVal offset As Long, value As Integer) As Integer
  654. Declare Function vb_ipeekx32 Lib "vbsicl32.dll" (ByVal id As Integer, ByVal handle As Long, ByVal offset As Long, value As Long) As Integer
  655. Declare Function vb_iblockmovex Lib "vbsicl32.dll" (ByVal id As Integer, ByVal srcHandle As Long, ByRef srcOffset As Variant, ByVal srcWidth As Integer, ByVal srcIncrement As Integer, ByVal destHandle As Long, ByRef destOffset As Variant, ByVal destWidth As Integer, ByVal destIncrement As Integer, ByVal count As Long, ByVal swap As Integer) As Integer
  656.  
  657. ' Block copy and fifo routines
  658. Declare Function vb_ibblockcopy Lib "vbsicl32.dll" (ByVal id As Integer, ByVal src As Long, ByVal dest As Long, ByVal cnt As Long) As Integer
  659. Declare Function vb_iwblockcopy Lib "vbsicl32.dll" (ByVal id As Integer, ByVal src As Long, ByVal dest As Long, ByVal cnt As Long, ByVal swap As Integer) As Integer
  660. Declare Function vb_ilblockcopy Lib "vbsicl32.dll" (ByVal id As Integer, ByVal src As Long, ByVal dest As Long, ByVal cnt As Long, ByVal swap As Integer) As Integer
  661. Declare Function vb_ibpushfifo Lib "vbsicl32.dll" (ByVal id As Integer, ByVal src As Long, ByVal fifo As Long, ByVal cnt As Long) As Integer
  662. Declare Function vb_iwpushfifo Lib "vbsicl32.dll" (ByVal id As Integer, ByVal src As Long, ByVal fifo As Long, ByVal cnt As Long, ByVal swap As Integer) As Integer
  663. Declare Function vb_ilpushfifo Lib "vbsicl32.dll" (ByVal id As Integer, ByVal src As Long, ByVal fifo As Long, ByVal cnt As Long, ByVal swap As Integer) As Integer
  664. Declare Function vb_ibpopfifo Lib "vbsicl32.dll" (ByVal id As Integer, ByVal fifo As Long, ByVal dest As Long, ByVal cnt As Long) As Integer
  665. Declare Function vb_iwpopfifo Lib "vbsicl32.dll" (ByVal id As Integer, ByVal fifo As Long, ByVal dest As Long, ByVal cnt As Long, ByVal swap As Integer) As Integer
  666. Declare Function vb_ilpopfifo Lib "vbsicl32.dll" (ByVal id As Integer, ByVal fifo As Long, ByVal dest As Long, ByVal cnt As Long, ByVal swap As Integer) As Integer
  667. Declare Function vb_icmd Lib "vbsicl32.dll" (ByVal id As Integer, ByVal cmd As Long, ByVal datalen As Integer, ByVal datawidth As Integer, ByRef pdata As Long) As Integer
  668.  
  669. ' Windows 3.1 Cleanup routines
  670. Declare Function vb__siclcleanup Lib "vbsicl32.dll" () As Integer
  671.  
  672. ' Windows 3.1 yield control routine
  673. Declare Function vb__setsiclyield Lib "vbsicl32.dll" (ByVal yield_option As Integer) As Integer
  674.  
  675. ' Peek/Poke routines
  676. Declare Sub vb_ibpoke Lib "vbsicl32.dll" (ByVal addr As Long, ByVal value As Byte)
  677. Declare Sub vb_iwpoke Lib "vbsicl32.dll" (ByVal addr As Long, ByVal value As Integer)
  678. Declare Sub vb_ilpoke Lib "vbsicl32.dll" (ByVal addr As Long, ByVal value As Long)
  679. Declare Function vb_ibpeek Lib "vbsicl32.dll" (ByVal addr As Long) As Byte
  680. Declare Function vb_iwpeek Lib "vbsicl32.dll" (ByVal addr As Long) As Integer
  681. Declare Function vb_ilpeek Lib "vbsicl32.dll" (ByVal addr As Long) As Long
  682. #End If
  683.  
  684. Function iversion(specversion As Integer, implversion As Integer) As Integer
  685.     Dim id As Integer
  686.     Dim thisErrno As Integer
  687.     Dim myerrstr As String * 60
  688.     Dim tmp As Integer
  689.  
  690.     ' Call the function in the SICL DLL and check for errors
  691.     id = vb_iversion(specversion, implversion)
  692.     iversion = id
  693.     If id <> 0 Then
  694.         thisErrno = vb_igeterrno()
  695.         If thisErrno <> 0 Then
  696.             Err.Clear    ' set default values in the error object
  697.             ' set the error string and raise the error
  698.             tmp = vb_igeterrstr(thisErrno, myerrstr)
  699.             Err.Description = myerrstr
  700.             Err.Raise (thisErrno) 'Raise the error
  701.         End If
  702.     End If
  703.  
  704. End Function
  705.  
  706. Function idrvrversion(id1 As Integer, specversion As Integer, implversion As Integer) As Integer
  707.     Dim id As Integer
  708.     Dim thisErrno As Integer
  709.     Dim myerrstr As String * 60
  710.     Dim tmp As Integer
  711.  
  712.     ' Call the function in the SICL DLL and check for errors
  713.     id = vb_idrvrversion(id1, specversion, implversion)
  714.     idrvrversion = id
  715.     If id <> 0 Then
  716.         thisErrno = vb_igeterrno()
  717.         If thisErrno <> 0 Then
  718.             Err.Clear    ' set default values in the error object
  719.             ' set the error string and raise the error
  720.             tmp = vb_igeterrstr(thisErrno, myerrstr)
  721.             Err.Description = myerrstr
  722.             Err.Raise (thisErrno) 'Raise the error
  723.         End If
  724.     End If
  725.  
  726. End Function
  727.  
  728. Function iopen(siclAddr As String) As Integer
  729.     Dim id As Integer
  730.     Dim thisErrno As Integer
  731.     Dim myerrstr As String * 60
  732.     Dim tmp As Integer
  733.  
  734.     ' Call the function in the SICL DLL and check for errors
  735.     id = vb_iopen(siclAddr)
  736.     iopen = id
  737.  
  738.     ' If we get 0 back, there was an error, try to report it
  739.     If id = 0 Then
  740.         thisErrno = vb_igeterrno()
  741.         If thisErrno <> 0 Then
  742.             Err.Clear    ' set default values in the error object
  743.             ' set the error string and raise the error
  744.             tmp = vb_igeterrstr(thisErrno, myerrstr)
  745.             Err.Description = myerrstr
  746.             Err.Raise (thisErrno) 'Raise the error
  747.         End If
  748.     End If
  749.  
  750. End Function
  751.  
  752.  
  753.  
  754. Function iclose(ByVal id1 As Integer) As Integer
  755.     Dim id As Integer
  756.     Dim thisErrno As Integer
  757.     Dim myerrstr As String * 60
  758.     Dim tmp As Integer
  759.  
  760.     ' Call the function in the SICL DLL and check for errors
  761.     id = vb_iclose(id1)
  762.     iclose = id
  763.     
  764.     ' If return value was not 0, we had an error
  765.     If id <> 0 Then
  766.         thisErrno = vb_igeterrno()
  767.         If thisErrno <> 0 Then
  768.             Err.Clear    ' set default values in the error object
  769.             ' set the error string and raise the error
  770.             tmp = vb_igeterrstr(thisErrno, myerrstr)
  771.             Err.Description = myerrstr
  772.             Err.Raise (thisErrno) 'Raise the error
  773.         End If
  774.     End If
  775.  
  776. End Function
  777.  
  778.  
  779. Function igetintfsess(ByVal id1 As Integer) As Integer
  780.     Dim id As Integer
  781.     Dim thisErrno As Integer
  782.     Dim myerrstr As String * 60
  783.     Dim tmp As Integer
  784.  
  785.     ' Call the function in the SICL DLL and check for errors
  786.     id = vb_igetintfsess(id1)
  787.     igetintfsess = id
  788.  
  789.     ' If we get 0 back, there was an error, try to report it
  790.     If id = 0 Then
  791.         thisErrno = vb_igeterrno()
  792.         If thisErrno <> 0 Then
  793.             Err.Clear    ' set default values in the error object
  794.             ' set the error string and raise the error
  795.             tmp = vb_igeterrstr(thisErrno, myerrstr)
  796.             Err.Description = myerrstr
  797.             Err.Raise (thisErrno) 'Raise the error
  798.         End If
  799.     End If
  800.  
  801. End Function
  802.  
  803. Function iwrite(ByVal id1 As Integer, ByVal buf As Variant, ByVal datalen As Long, ByVal endi As Integer, actual As Long) As Integer
  804.     Dim id As Integer
  805.     Dim thisErrno As Integer
  806.     Dim myerrstr As String * 60
  807.     Dim tmp As Integer
  808.  
  809.     tmp = VarType(buf)
  810.  
  811.     'If the buf is a string, then Win16 requires it to be < 32768 bytes
  812.     If tmp = 8 Then
  813. #If Win16 Then
  814.        If datalen > 32767 Then
  815.           Err.Clear
  816.           myerrstr = "Second param string length must be <= 32767"
  817.           Err.Description = myerrstr
  818.           MsgBox myerrstr
  819.           Err.Raise (I_ERR_PARAM) 'Raise the error
  820.        End If
  821. #End If
  822.     End If
  823.  
  824.     ' Call the function in the SICL DLL and check for errors
  825.     id = vb_iwrite(1, id1, buf, datalen, endi, actual)
  826.     
  827.     iwrite = id
  828.     If id <> 0 Then
  829.         thisErrno = vb_igeterrno()
  830.         If thisErrno <> 0 Then
  831.             Err.Clear    ' set default values in the error object
  832.             ' set the error string and raise the error
  833.             tmp = vb_igeterrstr(thisErrno, myerrstr)
  834.             Err.Description = myerrstr
  835.             Err.Raise (thisErrno) 'Raise the error
  836.         End If
  837.     End If
  838.  
  839. End Function
  840.  
  841. Function ifwrite(ByVal id1 As Integer, ByVal buf As Variant, ByVal datalen As Long, ByVal endi As Integer, actual As Long) As Integer
  842.     Dim id As Integer
  843.     Dim thisErrno As Integer
  844.     Dim myerrstr As String * 60
  845.     Dim tmp As Integer
  846.  
  847.     tmp = VarType(buf)
  848.  
  849.     'If the buf is a string, then Win16 requires it to be < 32768 bytes
  850.     If tmp = 8 Then
  851. #If Win16 Then
  852.        If datalen > 32767 Then
  853.           Err.Clear
  854.           myerrstr = "Second param string length must be <= 32767"
  855.           Err.Description = myerrstr
  856.           MsgBox myerrstr
  857.           Err.Raise (I_ERR_PARAM) 'Raise the error
  858.        End If
  859. #End If
  860.     End If
  861.  
  862.     ' Call the function in the SICL DLL and check for errors
  863.     id = vb_iwrite(2, id1, buf, datalen, endi, actual)
  864.     
  865.     ifwrite = id
  866.     If id <> 0 Then
  867.         thisErrno = vb_igeterrno()
  868.         If thisErrno <> 0 Then
  869.             Err.Clear    ' set default values in the error object
  870.             ' set the error string and raise the error
  871.             tmp = vb_igeterrstr(thisErrno, myerrstr)
  872.             Err.Description = myerrstr
  873.             Err.Raise (thisErrno) 'Raise the error
  874.         End If
  875.     End If
  876.  
  877. End Function
  878.  
  879.  
  880. Function iread(ByVal id1 As Integer, ByRef buf As Variant, ByVal bufsize As Long, reason As Integer, actual As Long) As Integer
  881.     Dim id As Integer
  882.     Dim thisErrno As Integer
  883.     Dim myerrstr As String * 60
  884.     Dim tmp As Integer
  885.         
  886.     tmp = VarType(buf)
  887.  
  888.     'If the buf parameter string, Win16 needs it to be < 32768 bytes
  889.     If tmp = 8 Then
  890. #If Win16 Then
  891.        If bufsize > 32767 Then
  892.           Err.Clear
  893.           myerrstr = "Second param string length must be <= 32767"
  894.           Err.Description = myerrstr
  895.           MsgBox myerrstr
  896.           Err.Raise (I_ERR_PARAM) 'Raise the error
  897.        End If
  898. #End If
  899.     End If
  900.  
  901.     ' Call the function in the SICL DLL and check for errors
  902.     id = vb_iread(1, id1, buf, bufsize, reason, actual)
  903.     
  904.     iread = id
  905.  
  906.     If id <> 0 Then
  907.         thisErrno = vb_igeterrno()
  908.         If thisErrno <> 0 Then
  909.             Err.Clear    ' set default values in the error object
  910.             ' set the error string and raise the error
  911.             tmp = vb_igeterrstr(thisErrno, myerrstr)
  912.             Err.Description = myerrstr
  913.             Err.Raise (thisErrno) 'Raise the error
  914.         End If
  915.     End If
  916.  
  917. End Function
  918.  
  919. Function ifread(ByVal id1 As Integer, ByRef buf As Variant, ByVal bufsize As Long, reason As Integer, actual As Long) As Integer
  920.     Dim id As Integer
  921.     Dim thisErrno As Integer
  922.     Dim myerrstr As String * 60
  923.     Dim tmp As Integer
  924.         
  925.     tmp = VarType(buf)
  926.  
  927.     'If the buf parameter string, Win16 needs it to be < 32768 bytes
  928.     If tmp = 8 Then
  929. #If Win16 Then
  930.        If bufsize > 32767 Then
  931.           Err.Clear
  932.           myerrstr = "Second param string length must be <= 32767"
  933.           Err.Description = myerrstr
  934.           MsgBox myerrstr
  935.           Err.Raise (I_ERR_PARAM) 'Raise the error
  936.        End If
  937. #End If
  938.     End If
  939.  
  940.     ' Call the function in the SICL DLL and check for errors
  941.     id = vb_iread(2, id1, buf, bufsize, reason, actual)
  942.     
  943.     ifread = id
  944.  
  945.     If id <> 0 Then
  946.         thisErrno = vb_igeterrno()
  947.         If thisErrno <> 0 Then
  948.             Err.Clear    ' set default values in the error object
  949.             ' set the error string and raise the error
  950.             tmp = vb_igeterrstr(thisErrno, myerrstr)
  951.             Err.Description = myerrstr
  952.             Err.Raise (thisErrno) 'Raise the error
  953.         End If
  954.     End If
  955.  
  956. End Function
  957.  
  958.  
  959.  
  960. Function itermchr(ByVal id1 As Integer, ByVal tchr As Integer) As Integer
  961.     Dim id As Integer
  962.     Dim thisErrno As Integer
  963.     Dim myerrstr As String * 60
  964.     Dim tmp As Integer
  965.  
  966.     ' Call the function in the SICL DLL and check for errors
  967.     id = vb_itermchr(id1, tchr)
  968.     itermchr = id
  969.     If id <> 0 Then
  970.         thisErrno = vb_igeterrno()
  971.         If thisErrno <> 0 Then
  972.             Err.Clear    ' set default values in the error object
  973.             ' set the error string and raise the error
  974.             tmp = vb_igeterrstr(thisErrno, myerrstr)
  975.             Err.Description = myerrstr
  976.             Err.Raise (thisErrno) 'Raise the error
  977.         End If
  978.     End If
  979.  
  980. End Function
  981.  
  982.  
  983. Function igettermchr(ByVal id1 As Integer, tchr As Integer) As Integer
  984.     Dim id As Integer
  985.     Dim thisErrno As Integer
  986.     Dim myerrstr As String * 60
  987.     Dim tmp As Integer
  988.  
  989.     ' Call the function in the SICL DLL and check for errors
  990.     id = vb_igettermchr(id1, tchr)
  991.     igettermchr = id
  992.     If id <> 0 Then
  993.         thisErrno = vb_igeterrno()
  994.         If thisErrno <> 0 Then
  995.             Err.Clear    ' set default values in the error object
  996.             ' set the error string and raise the error
  997.             tmp = vb_igeterrstr(thisErrno, myerrstr)
  998.             Err.Description = myerrstr
  999.             Err.Raise (thisErrno) 'Raise the error
  1000.         End If
  1001.     End If
  1002.  
  1003. End Function
  1004.  
  1005.  
  1006. Function ivprintf(ByVal id1 As Integer, ByVal fmt As String, Optional ByVal ap As Variant) As Integer
  1007.     Dim id As Integer
  1008.     Dim thisErrno As Integer
  1009.     Dim myerrstr As String * 60
  1010.     Dim tmp As Integer
  1011.     Dim howLong As Long
  1012.  
  1013.     ' Force no error to be condition
  1014.     Call vb_icauseerr(id1, 0, 0)
  1015.  
  1016.     
  1017.     If VarType(ap) = 8 Then
  1018.        howLong = Len(ap)
  1019. #If Win16 Then
  1020.        If howLong > 32767 Then
  1021.           Err.Clear
  1022.           myerrstr = "Third param string length must be <= 32767"
  1023.           Err.Description = myerrstr
  1024.           MsgBox myerrstr
  1025.           Err.Raise (I_ERR_PARAM) 'Raise the error
  1026.        End If
  1027. #End If
  1028.     Else
  1029.        howLong = 0
  1030.     End If
  1031.       
  1032.     ' Call the function in the SICL DLL and check for errors
  1033.     If IsMissing(ap) Then
  1034.        id = vb_ivprintf(ByVal id1, ByVal fmt, ByVal sEmpty, ByVal howLong)
  1035.     ElseIf IsEmpty(ap) Then
  1036.        id = vb_ivprintf(ByVal id1, ByVal fmt, ByVal sEmpty, ByVal howLong)
  1037.     Else
  1038.        id = vb_ivprintf(ByVal id1, ByVal fmt, ByVal ap, ByVal howLong)
  1039.     End If
  1040.     
  1041.     ivprintf = id
  1042.  
  1043.     thisErrno = vb_igeterrno()
  1044.     If thisErrno <> 0 Then
  1045.         Err.Clear    ' set default values in the error object
  1046.         ' set the error string and raise the error
  1047.         tmp = vb_igeterrstr(thisErrno, myerrstr)
  1048.         Err.Description = myerrstr
  1049.         Err.Raise (thisErrno) 'Raise the error
  1050.     End If
  1051.  
  1052. End Function
  1053.  
  1054.  
  1055. Function ivscanf(ByVal id1 As Integer, ByVal fmt As String, ByRef myVal As Variant) As Integer
  1056.     Dim id As Integer
  1057.     Dim thisErrno As Integer
  1058.     Dim howLong As Long
  1059.     Dim myerrstr As String * 60
  1060.     Dim tmp As Integer
  1061.     Dim returnStr As String
  1062.         
  1063.     ' Put anything in the local string to make non-null
  1064.     returnStr = "aa"
  1065.                    
  1066.     ' Force no error to be condition
  1067.     Call vb_icauseerr(id1, 0, 0)
  1068.  
  1069.     tmp = VarType(myVal)
  1070.  
  1071.     If VarType(myVal) = 8 Then
  1072.        howLong = Len(myVal)
  1073. #If Win16 Then
  1074.        If howLong > 32767 Then
  1075.           Err.Clear
  1076.           myerrstr = "Third param string length must be <= 32767"
  1077.           Err.Description = myerrstr
  1078.           MsgBox myerrstr
  1079.           Err.Raise (I_ERR_PARAM) 'Raise the error
  1080.        End If
  1081. #End If
  1082.     Else
  1083.        howLong = 0
  1084.     End If
  1085.  
  1086.     ' Call the function in the SICL DLL and check for errors
  1087.     If tmp = 8 Then
  1088.        id = vb_ivscanf(id1, fmt, returnStr, howLong)
  1089.  
  1090.        'Place scanf value into myVal
  1091.        myVal = returnStr
  1092.     Else
  1093.        id = vb_ivscanf(id1, fmt, myVal, howLong)
  1094.     End If
  1095.  
  1096.         
  1097.     ivscanf = id
  1098.         
  1099.     thisErrno = vb_igeterrno()
  1100.     If thisErrno <> 0 Then
  1101.         myerrstr = ""
  1102.         Err.Clear    ' set default values in the error object
  1103.         ' set the error string and raise the error
  1104.         tmp = vb_igeterrstr(thisErrno, myerrstr)
  1105.         Err.Description = myerrstr
  1106.         MsgBox myerrstr
  1107.         Err.Raise (thisErrno) 'Raise the error
  1108.     End If
  1109.  
  1110. End Function
  1111.  
  1112.  
  1113. Function iflush(ByVal id1 As Integer, ByVal mask As Integer) As Integer
  1114.     Dim id As Integer
  1115.     Dim thisErrno As Integer
  1116.     Dim myerrstr As String * 60
  1117.     Dim tmp As Integer
  1118.  
  1119.     ' Call the function in the SICL DLL and check for errors
  1120.     id = vb_iflush(id1, mask)
  1121.     iflush = id
  1122.     If id <> 0 Then
  1123.         thisErrno = vb_igeterrno()
  1124.         If thisErrno <> 0 Then
  1125.             Err.Clear    ' set default values in the error object
  1126.             ' set the error string and raise the error
  1127.             tmp = vb_igeterrstr(thisErrno, myerrstr)
  1128.             Err.Description = myerrstr
  1129.             Err.Raise (thisErrno) 'Raise the error
  1130.         End If
  1131.     End If
  1132.  
  1133. End Function
  1134.  
  1135.  
  1136.  
  1137. Function isetbuf(ByVal id1 As Integer, ByVal mask As Integer, ByVal size As Integer) As Integer
  1138.     Dim id As Integer
  1139.     Dim thisErrno As Integer
  1140.     Dim myerrstr As String * 60
  1141.     Dim tmp As Integer
  1142.  
  1143.     ' Call the function in the SICL DLL and check for errors
  1144.     id = vb_isetbuf(id1, mask, size)
  1145.     isetbuf = id
  1146.     If id <> 0 Then
  1147.         thisErrno = vb_igeterrno()
  1148.         If thisErrno <> 0 Then
  1149.             Err.Clear    ' set default values in the error object
  1150.             ' set the error string and raise the error
  1151.             tmp = vb_igeterrstr(thisErrno, myerrstr)
  1152.             Err.Description = myerrstr
  1153.             Err.Raise (thisErrno) 'Raise the error
  1154.         End If
  1155.     End If
  1156.  
  1157. End Function
  1158.  
  1159.  
  1160.  
  1161. Function iclear(ByVal id1 As Integer) As Integer
  1162.     Dim id As Integer
  1163.     Dim thisErrno As Integer
  1164.     Dim myerrstr As String * 60
  1165.     Dim tmp As Integer
  1166.  
  1167.     ' Call the function in the SICL DLL and check for errors
  1168.     id = vb_iclear(id1)
  1169.     iclear = id
  1170.     If id <> 0 Then
  1171.         thisErrno = vb_igeterrno()
  1172.         If thisErrno <> 0 Then
  1173.             Err.Clear    ' set default values in the error object
  1174.             ' set the error string and raise the error
  1175.             tmp = vb_igeterrstr(thisErrno, myerrstr)
  1176.             Err.Description = myerrstr
  1177.             Err.Raise (thisErrno) 'Raise the error
  1178.         End If
  1179.     End If
  1180.  
  1181. End Function
  1182.  
  1183. Function ilocal(ByVal id1 As Integer) As Integer
  1184.     Dim id As Integer
  1185.     Dim thisErrno As Integer
  1186.     Dim myerrstr As String * 60
  1187.     Dim tmp As Integer
  1188.  
  1189.     ' Call the function in the SICL DLL and check for errors
  1190.     id = vb_ilocal(id1)
  1191.     ilocal = id
  1192.     If id <> 0 Then
  1193.         thisErrno = vb_igeterrno()
  1194.         If thisErrno <> 0 Then
  1195.             Err.Clear    ' set default values in the error object
  1196.             ' set the error string and raise the error
  1197.             tmp = vb_igeterrstr(thisErrno, myerrstr)
  1198.             Err.Description = myerrstr
  1199.             Err.Raise (thisErrno) 'Raise the error
  1200.         End If
  1201.     End If
  1202.  
  1203. End Function
  1204.  
  1205.  
  1206.  
  1207. Function iremote(ByVal id1 As Integer) As Integer
  1208.     Dim id As Integer
  1209.     Dim thisErrno As Integer
  1210.     Dim myerrstr As String * 60
  1211.     Dim tmp As Integer
  1212.  
  1213.     ' Call the function in the SICL DLL and check for errors
  1214.     id = vb_iremote(id1)
  1215.     iremote = id
  1216.     If id <> 0 Then
  1217.         thisErrno = vb_igeterrno()
  1218.         If thisErrno <> 0 Then
  1219.             Err.Clear    ' set default values in the error object
  1220.             ' set the error string and raise the error
  1221.             tmp = vb_igeterrstr(thisErrno, myerrstr)
  1222.             Err.Description = myerrstr
  1223.             Err.Raise (thisErrno) 'Raise the error
  1224.         End If
  1225.     End If
  1226.  
  1227. End Function
  1228.  
  1229.  
  1230.  
  1231. Function ireadstb(ByVal id1 As Integer, ByRef stb As Integer) As Integer
  1232.     Dim id As Integer
  1233.     Dim thisErrno As Integer
  1234.     Dim myerrstr As String * 60
  1235.     Dim tmp As Integer
  1236.  
  1237.     ' Call the function in the SICL DLL and check for errors
  1238.     id = vb_ireadstb(id1, stb)
  1239.     ireadstb = id
  1240.     If id <> 0 Then
  1241.         thisErrno = vb_igeterrno()
  1242.         If thisErrno <> 0 Then
  1243.             Err.Clear    ' set default values in the error object
  1244.             ' set the error string and raise the error
  1245.             tmp = vb_igeterrstr(thisErrno, myerrstr)
  1246.             Err.Description = myerrstr
  1247.             Err.Raise (thisErrno) 'Raise the error
  1248.         End If
  1249.     End If
  1250.  
  1251. End Function
  1252.  
  1253.  
  1254.  
  1255. Function itrigger(ByVal id1 As Integer) As Integer
  1256.     Dim id As Integer
  1257.     Dim thisErrno As Integer
  1258.     Dim myerrstr As String * 60
  1259.     Dim tmp As Integer
  1260.  
  1261.     ' Call the function in the SICL DLL and check for errors
  1262.     id = vb_itrigger(id1)
  1263.     itrigger = id
  1264.     If id <> 0 Then
  1265.         thisErrno = vb_igeterrno()
  1266.         If thisErrno <> 0 Then
  1267.             Err.Clear    ' set default values in the error object
  1268.             ' set the error string and raise the error
  1269.             tmp = vb_igeterrstr(thisErrno, myerrstr)
  1270.             Err.Description = myerrstr
  1271.             Err.Raise (thisErrno) 'Raise the error
  1272.         End If
  1273.     End If
  1274.  
  1275. End Function
  1276.  
  1277.  
  1278.  
  1279. Function ixtrig(ByVal id1 As Integer, ByVal which As Long) As Integer
  1280.     Dim id As Integer
  1281.     Dim thisErrno As Integer
  1282.     Dim myerrstr As String * 60
  1283.     Dim tmp As Integer
  1284.  
  1285.     ' Call the function in the SICL DLL and check for errors
  1286.     id = vb_ixtrig(id1, which)
  1287.     ixtrig = id
  1288.     If id <> 0 Then
  1289.         thisErrno = vb_igeterrno()
  1290.         If thisErrno <> 0 Then
  1291.             Err.Clear    ' set default values in the error object
  1292.             ' set the error string and raise the error
  1293.             tmp = vb_igeterrstr(thisErrno, myerrstr)
  1294.             Err.Description = myerrstr
  1295.             Err.Raise (thisErrno) 'Raise the error
  1296.         End If
  1297.     End If
  1298.  
  1299. End Function
  1300.  
  1301.  
  1302. Function ihint(ByVal id1 As Integer, ByVal hint As Integer) As Integer
  1303.     Dim id As Integer
  1304.     Dim thisErrno As Integer
  1305.     Dim myerrstr As String * 60
  1306.     Dim tmp As Integer
  1307.  
  1308.     ' Call the function in the SICL DLL and check for errors
  1309.     id = vb_ihint(id1, hint)
  1310.     ihint = id
  1311.     If id <> 0 Then
  1312.         thisErrno = vb_igeterrno()
  1313.         If thisErrno <> 0 Then
  1314.             Err.Clear    ' set default values in the error object
  1315.             ' set the error string and raise the error
  1316.             tmp = vb_igeterrstr(thisErrno, myerrstr)
  1317.             Err.Description = myerrstr
  1318.             Err.Raise (thisErrno) 'Raise the error
  1319.         End If
  1320.     End If
  1321.  
  1322. End Function
  1323.  
  1324.  
  1325. Function isetstb(ByVal id1 As Integer, ByVal stb As Byte) As Integer
  1326.     Dim id As Integer
  1327.     Dim thisErrno As Integer
  1328.     Dim myerrstr As String * 60
  1329.     Dim tmp As Integer
  1330.  
  1331.     ' Call the function in the SICL DLL and check for errors
  1332.     id = vb_isetstb(id1, stb)
  1333.     isetstb = id
  1334.     If id <> 0 Then
  1335.         thisErrno = vb_igeterrno()
  1336.         If thisErrno <> 0 Then
  1337.             Err.Clear    ' set default values in the error object
  1338.             ' set the error string and raise the error
  1339.             tmp = vb_igeterrstr(thisErrno, myerrstr)
  1340.             Err.Description = myerrstr
  1341.             Err.Raise (thisErrno) 'Raise the error
  1342.         End If
  1343.     End If
  1344.  
  1345. End Function
  1346.  
  1347.  
  1348.  
  1349. Function ilock(ByVal id1 As Integer) As Integer
  1350.     Dim id As Integer
  1351.     Dim thisErrno As Integer
  1352.     Dim myerrstr As String * 60
  1353.     Dim tmp As Integer
  1354.  
  1355.     ' Call the function in the SICL DLL and check for errors
  1356.     id = vb_ilock(id1)
  1357.     ilock = id
  1358.     If id <> 0 Then
  1359.         thisErrno = vb_igeterrno()
  1360.         If thisErrno <> 0 Then
  1361.             Err.Clear    ' set default values in the error object
  1362.             ' set the error string and raise the error
  1363.             tmp = vb_igeterrstr(thisErrno, myerrstr)
  1364.             Err.Description = myerrstr
  1365.             Err.Raise (thisErrno) 'Raise the error
  1366.         End If
  1367.     End If
  1368.  
  1369. End Function
  1370.  
  1371.  
  1372.  
  1373. Function iunlock(ByVal id1 As Integer) As Integer
  1374.     Dim id As Integer
  1375.     Dim thisErrno As Integer
  1376.     Dim myerrstr As String * 60
  1377.     Dim tmp As Integer
  1378.  
  1379.     ' Call the function in the SICL DLL and check for errors
  1380.     id = vb_iunlock(id1)
  1381.     iunlock = id
  1382.     If id <> 0 Then
  1383.         thisErrno = vb_igeterrno()
  1384.         If thisErrno <> 0 Then
  1385.             Err.Clear    ' set default values in the error object
  1386.             ' set the error string and raise the error
  1387.             tmp = vb_igeterrstr(thisErrno, myerrstr)
  1388.             Err.Description = myerrstr
  1389.             Err.Raise (thisErrno) 'Raise the error
  1390.         End If
  1391.     End If
  1392.  
  1393. End Function
  1394.  
  1395.  
  1396.  
  1397. Function isetlockwait(ByVal id1 As Integer, ByVal flag As Integer) As Integer
  1398.     Dim id As Integer
  1399.     Dim thisErrno As Integer
  1400.     Dim myerrstr As String * 60
  1401.     Dim tmp As Integer
  1402.  
  1403.     ' Call the function in the SICL DLL and check for errors
  1404.     id = vb_isetlockwait(id1, flag)
  1405.     isetlockwait = id
  1406.     If id <> 0 Then
  1407.         thisErrno = vb_igeterrno()
  1408.         If thisErrno <> 0 Then
  1409.             Err.Clear    ' set default values in the error object
  1410.             ' set the error string and raise the error
  1411.             tmp = vb_igeterrstr(thisErrno, myerrstr)
  1412.             Err.Description = myerrstr
  1413.             Err.Raise (thisErrno) 'Raise the error
  1414.         End If
  1415.     End If
  1416.  
  1417. End Function
  1418.  
  1419.  
  1420.  
  1421. Function igetlockwait(ByVal id1 As Integer, flag As Integer) As Integer
  1422.     Dim id As Integer
  1423.     Dim thisErrno As Integer
  1424.     Dim myerrstr As String * 60
  1425.     Dim tmp As Integer
  1426.  
  1427.     ' Call the function in the SICL DLL and check for errors
  1428.     id = vb_igetlockwait(id1, flag)
  1429.     igetlockwait = id
  1430.     If id <> 0 Then
  1431.         thisErrno = vb_igeterrno()
  1432.         If thisErrno <> 0 Then
  1433.             Err.Clear    ' set default values in the error object
  1434.             ' set the error string and raise the error
  1435.             tmp = vb_igeterrstr(thisErrno, myerrstr)
  1436.             Err.Description = myerrstr
  1437.             Err.Raise (thisErrno) 'Raise the error
  1438.         End If
  1439.     End If
  1440.  
  1441. End Function
  1442.  
  1443.  
  1444.  
  1445. Function itimeout(ByVal id1 As Integer, ByVal tval As Long) As Integer
  1446.     Dim id As Integer
  1447.     Dim thisErrno As Integer
  1448.     Dim myerrstr As String * 60
  1449.     Dim tmp As Integer
  1450.  
  1451.     ' Call the function in the SICL DLL and check for errors
  1452.     id = vb_itimeout(id1, tval)
  1453.     itimeout = id
  1454.     If id <> 0 Then
  1455.         thisErrno = vb_igeterrno()
  1456.         If thisErrno <> 0 Then
  1457.             Err.Clear    ' set default values in the error object
  1458.             ' set the error string and raise the error
  1459.             tmp = vb_igeterrstr(thisErrno, myerrstr)
  1460.             Err.Description = myerrstr
  1461.             Err.Raise (thisErrno) 'Raise the error
  1462.         End If
  1463.     End If
  1464.  
  1465. End Function
  1466.  
  1467.  
  1468. Function igettimeout(ByVal id1 As Integer, tval As Long) As Integer
  1469.     Dim id As Integer
  1470.     Dim thisErrno As Integer
  1471.     Dim myerrstr As String * 60
  1472.     Dim tmp As Integer
  1473.  
  1474.     ' Call the function in the SICL DLL and check for errors
  1475.     id = vb_igettimeout(id1, tval)
  1476.     igettimeout = id
  1477.     If id <> 0 Then
  1478.         thisErrno = vb_igeterrno()
  1479.         If thisErrno <> 0 Then
  1480.             Err.Clear    ' set default values in the error object
  1481.             ' set the error string and raise the error
  1482.             tmp = vb_igeterrstr(thisErrno, myerrstr)
  1483.             Err.Description = myerrstr
  1484.             Err.Raise (thisErrno) 'Raise the error
  1485.         End If
  1486.     End If
  1487.  
  1488. End Function
  1489.  
  1490.  
  1491. Function igetaddr(ByVal id1 As Integer, ByRef addr As String) As Integer
  1492.     Dim id As Integer
  1493.     Dim thisErrno As Integer
  1494.     Dim myerrstr As String * 60
  1495.     Dim tmp As Integer
  1496.  
  1497.     ' Call the function in the SICL DLL and check for errors
  1498.     id = vb_igetaddr(id1, addr)
  1499.     igetaddr = id
  1500.     If id <> 0 Then
  1501.         thisErrno = vb_igeterrno()
  1502.         If thisErrno <> 0 Then
  1503.             Err.Clear    ' set default values in the error object
  1504.             ' set the error string and raise the error
  1505.             tmp = vb_igeterrstr(thisErrno, myerrstr)
  1506.             Err.Description = myerrstr
  1507.             Err.Raise (thisErrno) 'Raise the error
  1508.         End If
  1509.     End If
  1510.  
  1511. End Function
  1512.  
  1513.  
  1514. Function igetintftype(ByVal id1 As Integer, pdata As Integer) As Integer
  1515.     Dim id As Integer
  1516.     Dim thisErrno As Integer
  1517.     Dim myerrstr As String * 60
  1518.     Dim tmp As Integer
  1519.  
  1520.     ' Call the function in the SICL DLL and check for errors
  1521.     id = vb_igetintftype(id1, pdata)
  1522.     igetintftype = id
  1523.     If id <> 0 Then
  1524.         thisErrno = vb_igeterrno()
  1525.         If thisErrno <> 0 Then
  1526.             Err.Clear    ' set default values in the error object
  1527.             ' set the error string and raise the error
  1528.             tmp = vb_igeterrstr(thisErrno, myerrstr)
  1529.             Err.Description = myerrstr
  1530.             Err.Raise (thisErrno) 'Raise the error
  1531.         End If
  1532.     End If
  1533.  
  1534. End Function
  1535.  
  1536.  
  1537.  
  1538. Function igetsesstype(ByVal id1 As Integer, pdata As Integer) As Integer
  1539.     Dim id As Integer
  1540.     Dim thisErrno As Integer
  1541.     Dim myerrstr As String * 60
  1542.     Dim tmp As Integer
  1543.  
  1544.     ' Call the function in the SICL DLL and check for errors
  1545.     id = vb_igetsesstype(id1, pdata)
  1546.     igetsesstype = id
  1547.     If id <> 0 Then
  1548.         thisErrno = vb_igeterrno()
  1549.         If thisErrno <> 0 Then
  1550.             Err.Clear    ' set default values in the error object
  1551.             ' set the error string and raise the error
  1552.             tmp = vb_igeterrstr(thisErrno, myerrstr)
  1553.             Err.Description = myerrstr
  1554.             Err.Raise (thisErrno) 'Raise the error
  1555.         End If
  1556.     End If
  1557.  
  1558. End Function
  1559.  
  1560.  
  1561.  
  1562. Function igetdevaddr(ByVal id1 As Integer, prim As Integer, sec As Integer) As Integer
  1563.     Dim id As Integer
  1564.     Dim thisErrno As Integer
  1565.     Dim myerrstr As String * 60
  1566.     Dim tmp As Integer
  1567.  
  1568.     ' Call the function in the SICL DLL and check for errors
  1569.     id = vb_igetdevaddr(id1, prim, sec)
  1570.     igetdevaddr = id
  1571.     If id <> 0 Then
  1572.         thisErrno = vb_igeterrno()
  1573.         If thisErrno <> 0 Then
  1574.             Err.Clear    ' set default values in the error object
  1575.             ' set the error string and raise the error
  1576.             tmp = vb_igeterrstr(thisErrno, myerrstr)
  1577.             Err.Description = myerrstr
  1578.             Err.Raise (thisErrno) 'Raise the error
  1579.         End If
  1580.     End If
  1581.  
  1582. End Function
  1583.  
  1584.  
  1585.  
  1586. Function igetlu(ByVal id1 As Integer, lu As Integer) As Integer
  1587.     Dim id As Integer
  1588.     Dim thisErrno As Integer
  1589.     Dim myerrstr As String * 60
  1590.     Dim tmp As Integer
  1591.  
  1592.     ' Call the function in the SICL DLL and check for errors
  1593.     id = vb_igetlu(id1, lu)
  1594.     igetlu = id
  1595.     If id <> 0 Then
  1596.         thisErrno = vb_igeterrno()
  1597.         If thisErrno <> 0 Then
  1598.             Err.Clear    ' set default values in the error object
  1599.             ' set the error string and raise the error
  1600.             tmp = vb_igeterrstr(thisErrno, myerrstr)
  1601.             Err.Description = myerrstr
  1602.             Err.Raise (thisErrno) 'Raise the error
  1603.         End If
  1604.     End If
  1605.  
  1606. End Function
  1607.  
  1608.  
  1609.  
  1610. Function ibeswap(addr As Variant, ByVal length As Long, ByVal datasize As Integer) As Integer
  1611.     Dim id As Integer
  1612.     Dim thisErrno As Integer
  1613.     Dim myerrstr As String * 60
  1614.     Dim tmp As Integer
  1615.  
  1616.     ' Call the function in the SICL DLL and check for errors
  1617.     id = vb_iswap(addr, length, datasize)
  1618.     ibeswap = id
  1619.     If id <> 0 Then
  1620.         thisErrno = vb_igeterrno()
  1621.         If thisErrno <> 0 Then
  1622.             Err.Clear    ' set default values in the error object
  1623.             ' set the error string and raise the error
  1624.             tmp = vb_igeterrstr(thisErrno, myerrstr)
  1625.             Err.Description = myerrstr
  1626.             Err.Raise (thisErrno) 'Raise the error
  1627.         End If
  1628.     End If
  1629.  
  1630. End Function
  1631.  
  1632.  
  1633.  
  1634. Function ileswap(addr As Variant, ByVal length As Long, ByVal datasize As Integer) As Integer
  1635.    ' We are already LE, so no swapping necesary...
  1636.    ileswap = I_ERR_NOERROR
  1637. End Function
  1638.  
  1639.  
  1640. Function iswap(addr As Variant, ByVal length As Long, ByVal datasize As Integer) As Integer
  1641.     Dim id As Integer
  1642.     Dim thisErrno As Integer
  1643.     Dim myerrstr As String * 60
  1644.     Dim tmp As Integer
  1645.  
  1646.     ' Call the function in the SICL DLL and check for errors
  1647.     id = vb_iswap(addr, length, datasize)
  1648.     iswap = id
  1649.     If id <> 0 Then
  1650.         thisErrno = vb_igeterrno()
  1651.         If thisErrno <> 0 Then
  1652.             Err.Clear    ' set default values in the error object
  1653.             ' set the error string and raise the error
  1654.             tmp = vb_igeterrstr(thisErrno, myerrstr)
  1655.             Err.Description = myerrstr
  1656.             Err.Raise (thisErrno) 'Raise the error
  1657.         End If
  1658.     End If
  1659.  
  1660. End Function
  1661.  
  1662.  
  1663. Function igetlulist(list() As Integer) As Integer
  1664.     Dim id As Integer
  1665.     Dim thisErrno As Integer
  1666.     Dim myerrstr As String * 60
  1667.     Dim tmp As Integer
  1668.  
  1669.     ' Call the function in the SICL DLL and check for errors
  1670.     id = vb_igetlulist(list)
  1671.     igetlulist = id
  1672.     If id <> 0 Then
  1673.         thisErrno = vb_igeterrno()
  1674.         If thisErrno <> 0 Then
  1675.             Err.Clear    ' set default values in the error object
  1676.             ' set the error string and raise the error
  1677.             tmp = vb_igeterrstr(thisErrno, myerrstr)
  1678.             Err.Description = myerrstr
  1679.             Err.Raise (thisErrno) 'Raise the error
  1680.         End If
  1681.     End If
  1682.  
  1683. End Function
  1684.  
  1685. Function igetluinfo(ByVal lu As Integer, result As lu_info) As Integer
  1686.     Dim id As Integer
  1687.     Dim thisErrno As Integer
  1688.     Dim myerrstr As String * 60
  1689.     Dim tmp As Integer
  1690.     Dim tempLu As lu_info
  1691.  
  1692.     tempLu.hwarg(0) = "abc0"
  1693.     tempLu.hwarg(1) = "efg1"
  1694.     tempLu.hwarg(2) = "ijk2"
  1695.  
  1696.     ' Call the function in the SICL DLL and check for errors
  1697.     id = vb_igetluinfo(lu, tempLu)
  1698.     igetluinfo = id
  1699.     If id <> 0 Then
  1700.         thisErrno = vb_igeterrno()
  1701.         If thisErrno <> 0 Then
  1702.             Err.Clear    ' set default values in the error object
  1703.             ' set the error string and raise the error
  1704.             tmp = vb_igeterrstr(thisErrno, myerrstr)
  1705.             Err.Description = myerrstr
  1706.             Err.Raise (thisErrno) 'Raise the error
  1707.         End If
  1708.     Else
  1709.        'No error, so copy data to struct
  1710.        result = tempLu
  1711.     End If
  1712.  
  1713. End Function
  1714.  
  1715.  
  1716. Function igetgatewaytype(ByVal id1 As Integer, pdata As Integer) As Integer
  1717.     Dim id As Integer
  1718.     Dim thisErrno As Integer
  1719.     Dim myerrstr As String * 60
  1720.     Dim tmp As Integer
  1721.  
  1722.     ' Call the function in the SICL DLL and check for errors
  1723.     id = vb_igetgatewaytype(id1, pdata)
  1724.     igetgatewaytype = id
  1725.     If id <> 0 Then
  1726.         thisErrno = vb_igeterrno()
  1727.         If thisErrno <> 0 Then
  1728.             Err.Clear    ' set default values in the error object
  1729.             ' set the error string and raise the error
  1730.             tmp = vb_igeterrstr(thisErrno, myerrstr)
  1731.             Err.Description = myerrstr
  1732.             Err.Raise (thisErrno) 'Raise the error
  1733.         End If
  1734.     End If
  1735.  
  1736. End Function
  1737.  
  1738.  
  1739. Function iserialmclstat(ByVal id1 As Integer, ByVal sline As Integer, state As Integer) As Integer
  1740.     Dim id As Integer
  1741.     Dim thisErrno As Integer
  1742.     Dim myerrstr As String * 60
  1743.     Dim tmp As Integer
  1744.  
  1745.     ' Call the function in the SICL DLL and check for errors
  1746.     id = vb_iserialmclstat(id1, sline, state)
  1747.     iserialmclstat = id
  1748.     If id <> 0 Then
  1749.         thisErrno = vb_igeterrno()
  1750.         If thisErrno <> 0 Then
  1751.             Err.Clear    ' set default values in the error object
  1752.             ' set the error string and raise the error
  1753.             tmp = vb_igeterrstr(thisErrno, myerrstr)
  1754.             Err.Description = myerrstr
  1755.             Err.Raise (thisErrno) 'Raise the error
  1756.         End If
  1757.     End If
  1758.  
  1759. End Function
  1760.  
  1761.  
  1762.  
  1763. Function iserialmclctrl(ByVal id1 As Integer, ByVal sline As Integer, ByVal state As Integer) As Integer
  1764.     Dim id As Integer
  1765.     Dim thisErrno As Integer
  1766.     Dim myerrstr As String * 60
  1767.     Dim tmp As Integer
  1768.  
  1769.     ' Call the function in the SICL DLL and check for errors
  1770.     id = vb_iserialmclctrl(id1, sline, state)
  1771.     iserialmclctrl = id
  1772.     If id <> 0 Then
  1773.         thisErrno = vb_igeterrno()
  1774.         If thisErrno <> 0 Then
  1775.             Err.Clear    ' set default values in the error object
  1776.             ' set the error string and raise the error
  1777.             tmp = vb_igeterrstr(thisErrno, myerrstr)
  1778.             Err.Description = myerrstr
  1779.             Err.Raise (thisErrno) 'Raise the error
  1780.         End If
  1781.     End If
  1782.  
  1783. End Function
  1784.  
  1785.  
  1786.  
  1787. Function iserialctrl(ByVal id1 As Integer, ByVal request As Integer, ByVal setting As Long) As Integer
  1788.     Dim id As Integer
  1789.     Dim thisErrno As Integer
  1790.     Dim myerrstr As String * 60
  1791.     Dim tmp As Integer
  1792.  
  1793.     ' Call the function in the SICL DLL and check for errors
  1794.     id = vb_iserialctrl(id1, request, setting)
  1795.     iserialctrl = id
  1796.     If id <> 0 Then
  1797.         thisErrno = vb_igeterrno()
  1798.         If thisErrno <> 0 Then
  1799.             Err.Clear    ' set default values in the error object
  1800.             ' set the error string and raise the error
  1801.             tmp = vb_igeterrstr(thisErrno, myerrstr)
  1802.             Err.Description = myerrstr
  1803.             Err.Raise (thisErrno) 'Raise the error
  1804.         End If
  1805.     End If
  1806.  
  1807. End Function
  1808.  
  1809.  
  1810.  
  1811. Function iserialstat(ByVal id1 As Integer, ByVal request As Integer, result As Long) As Integer
  1812.     Dim id As Integer
  1813.     Dim thisErrno As Integer
  1814.     Dim myerrstr As String * 60
  1815.     Dim tmp As Integer
  1816.  
  1817.     ' Call the function in the SICL DLL and check for errors
  1818.     id = vb_iserialstat(id1, request, result)
  1819.     iserialstat = id
  1820.     If id <> 0 Then
  1821.         thisErrno = vb_igeterrno()
  1822.         If thisErrno <> 0 Then
  1823.             Err.Clear    ' set default values in the error object
  1824.             ' set the error string and raise the error
  1825.             tmp = vb_igeterrstr(thisErrno, myerrstr)
  1826.             Err.Description = myerrstr
  1827.             Err.Raise (thisErrno) 'Raise the error
  1828.         End If
  1829.     End If
  1830.  
  1831. End Function
  1832.  
  1833.  
  1834.  
  1835. Function iserialbreak(ByVal id1 As Integer) As Integer
  1836.     Dim id As Integer
  1837.     Dim thisErrno As Integer
  1838.     Dim myerrstr As String * 60
  1839.     Dim tmp As Integer
  1840.  
  1841.     ' Call the function in the SICL DLL and check for errors
  1842.     id = vb_iserialbreak(id)
  1843.     iserialbreak = id
  1844.     If id <> 0 Then
  1845.         thisErrno = vb_igeterrno()
  1846.         If thisErrno <> 0 Then
  1847.             Err.Clear    ' set default values in the error object
  1848.             ' set the error string and raise the error
  1849.             tmp = vb_igeterrstr(thisErrno, myerrstr)
  1850.             Err.Description = myerrstr
  1851.             Err.Raise (thisErrno) 'Raise the error
  1852.         End If
  1853.     End If
  1854.  
  1855. End Function
  1856.  
  1857. Function ivxibusstatus(ByVal id1 As Integer, ByVal request As Integer, result As Long) As Integer
  1858.     Dim id As Integer
  1859.     Dim thisErrno As Integer
  1860.     Dim myerrstr As String * 60
  1861.     Dim tmp As Integer
  1862.  
  1863.     ' Call the function in the SICL DLL and check for errors
  1864.     id = vb_ivxibusstatus(id1, request, result)
  1865.     ivxibusstatus = id
  1866.     If id <> 0 Then
  1867.         thisErrno = vb_igeterrno()
  1868.         If thisErrno <> 0 Then
  1869.             Err.Clear    ' set default values in the error object
  1870.             ' set the error string and raise the error
  1871.             tmp = vb_igeterrstr(thisErrno, myerrstr)
  1872.             Err.Description = myerrstr
  1873.             Err.Raise (thisErrno) 'Raise the error
  1874.         End If
  1875.     End If
  1876.  
  1877. End Function
  1878.  
  1879. Function ivxiwaitnormop(ByVal id1 As Integer) As Integer
  1880.     Dim id As Integer
  1881.     Dim thisErrno As Integer
  1882.     Dim myerrstr As String * 60
  1883.     Dim tmp As Integer
  1884.  
  1885.     ' Call the function in the SICL DLL and check for errors
  1886.     id = vb_ivxiwaitnormop(id)
  1887.     ivxiwaitnormop = id
  1888.     If id <> 0 Then
  1889.         thisErrno = vb_igeterrno()
  1890.         If thisErrno <> 0 Then
  1891.             Err.Clear    ' set default values in the error object
  1892.             ' set the error string and raise the error
  1893.             tmp = vb_igeterrstr(thisErrno, myerrstr)
  1894.             Err.Description = myerrstr
  1895.             Err.Raise (thisErrno) 'Raise the error
  1896.         End If
  1897.     End If
  1898.  
  1899. End Function
  1900.  
  1901. Function ivxitrigon(ByVal id1 As Integer, ByVal which As Long) As Integer
  1902.     Dim id As Integer
  1903.     Dim thisErrno As Integer
  1904.     Dim myerrstr As String * 60
  1905.     Dim tmp As Integer
  1906.  
  1907.     ' Call the function in the SICL DLL and check for errors
  1908.     id = vb_ivxitrigon(id1, which)
  1909.     ivxitrigon = id
  1910.     If id <> 0 Then
  1911.         thisErrno = vb_igeterrno()
  1912.         If thisErrno <> 0 Then
  1913.             Err.Clear    ' set default values in the error object
  1914.             ' set the error string and raise the error
  1915.             tmp = vb_igeterrstr(thisErrno, myerrstr)
  1916.             Err.Description = myerrstr
  1917.             Err.Raise (thisErrno) 'Raise the error
  1918.         End If
  1919.     End If
  1920.  
  1921. End Function
  1922.  
  1923. Function ivxitrigoff(ByVal id1 As Integer, ByVal which As Long) As Integer
  1924.     Dim id As Integer
  1925.     Dim thisErrno As Integer
  1926.     Dim myerrstr As String * 60
  1927.     Dim tmp As Integer
  1928.  
  1929.     ' Call the function in the SICL DLL and check for errors
  1930.     id = vb_ivxitrigoff(id1, which)
  1931.     ivxitrigoff = id
  1932.     If id <> 0 Then
  1933.         thisErrno = vb_igeterrno()
  1934.         If thisErrno <> 0 Then
  1935.             Err.Clear    ' set default values in the error object
  1936.             ' set the error string and raise the error
  1937.             tmp = vb_igeterrstr(thisErrno, myerrstr)
  1938.             Err.Description = myerrstr
  1939.             Err.Raise (thisErrno) 'Raise the error
  1940.         End If
  1941.     End If
  1942.  
  1943. End Function
  1944.  
  1945. Function ivxitrigroute(ByVal id1 As Integer, ByVal in_which As Long, ByVal out_which As Long) As Integer
  1946.     Dim id As Integer
  1947.     Dim thisErrno As Integer
  1948.     Dim myerrstr As String * 60
  1949.     Dim tmp As Integer
  1950.  
  1951.     ' Call the function in the SICL DLL and check for errors
  1952.     id = vb_ivxitrigroute(id1, in_which, out_which)
  1953.     ivxitrigroute = id
  1954.     If id <> 0 Then
  1955.         thisErrno = vb_igeterrno()
  1956.         If thisErrno <> 0 Then
  1957.             Err.Clear    ' set default values in the error object
  1958.             ' set the error string and raise the error
  1959.             tmp = vb_igeterrstr(thisErrno, myerrstr)
  1960.             Err.Description = myerrstr
  1961.             Err.Raise (thisErrno) 'Raise the error
  1962.         End If
  1963.     End If
  1964.  
  1965. End Function
  1966.  
  1967. Function ivxigettrigroute(ByVal id1 As Integer, ByVal which As Long, route As Long) As Integer
  1968.     Dim id As Integer
  1969.     Dim thisErrno As Integer
  1970.     Dim myerrstr As String * 60
  1971.     Dim tmp As Integer
  1972.  
  1973.     ' Call the function in the SICL DLL and check for errors
  1974.     id = vb_ivxigettrigroute(id1, which, route)
  1975.     ivxigettrigroute = id
  1976.     If id <> 0 Then
  1977.         thisErrno = vb_igeterrno()
  1978.         If thisErrno <> 0 Then
  1979.             Err.Clear    ' set default values in the error object
  1980.             ' set the error string and raise the error
  1981.             tmp = vb_igeterrstr(thisErrno, myerrstr)
  1982.             Err.Description = myerrstr
  1983.             Err.Raise (thisErrno) 'Raise the error
  1984.         End If
  1985.     End If
  1986.  
  1987. End Function
  1988.  
  1989. Function ivxiws(ByVal id1 As Integer, ByVal wscmd As Integer, wsresp As Integer, rpe As Integer) As Integer
  1990.     Dim id As Integer
  1991.     Dim thisErrno As Integer
  1992.     Dim myerrstr As String * 60
  1993.     Dim tmp As Integer
  1994.  
  1995.     ' Call the function in the SICL DLL and check for errors
  1996.     id = vb_ivxiws(id1, wscmd, wsresp, rpe)
  1997.     ivxiws = id
  1998.     If id <> 0 Then
  1999.         thisErrno = vb_igeterrno()
  2000.         If thisErrno <> 0 Then
  2001.             Err.Clear    ' set default values in the error object
  2002.             ' set the error string and raise the error
  2003.             tmp = vb_igeterrstr(thisErrno, myerrstr)
  2004.             Err.Description = myerrstr
  2005.             Err.Raise (thisErrno) 'Raise the error
  2006.         End If
  2007.     End If
  2008.  
  2009. End Function
  2010.  
  2011. Function ivxiservants(ByVal id1 As Integer, ByVal maxnum As Integer, list() As Integer) As Integer
  2012.     Dim id As Integer
  2013.     Dim thisErrno As Integer
  2014.     Dim myerrstr As String * 60
  2015.     Dim tmp As Integer
  2016.  
  2017.     ' Call the function in the SICL DLL and check for errors
  2018.     id = vb_ivxiservants(id1, maxnum, list)
  2019.     ivxiservants = id
  2020.     If id <> 0 Then
  2021.         thisErrno = vb_igeterrno()
  2022.         If thisErrno <> 0 Then
  2023.             Err.Clear    ' set default values in the error object
  2024.             ' set the error string and raise the error
  2025.             tmp = vb_igeterrstr(thisErrno, myerrstr)
  2026.             Err.Description = myerrstr
  2027.             Err.Raise (thisErrno) 'Raise the error
  2028.         End If
  2029.     End If
  2030.  
  2031. End Function
  2032.  
  2033. Function ivxirminfo(ByVal id1 As Integer, ByVal laddr As Integer, ByRef info As vxiinfo) As Integer
  2034.     Dim id As Integer
  2035.     Dim thisErrno As Integer
  2036.     Dim myerrstr As String * 60
  2037.     Dim tmp As Integer
  2038.  
  2039.     ' Call the function in the SICL DLL and check for errors
  2040.     id = vb_ivxirminfo(id1, laddr, info)
  2041.     ivxirminfo = id
  2042.     If id <> 0 Then
  2043.         thisErrno = vb_igeterrno()
  2044.         If thisErrno <> 0 Then
  2045.             Err.Clear    ' set default values in the error object
  2046.             ' set the error string and raise the error
  2047.             tmp = vb_igeterrstr(thisErrno, myerrstr)
  2048.             Err.Description = myerrstr
  2049.             Err.Raise (thisErrno) 'Raise the error
  2050.         End If
  2051.     End If
  2052.  
  2053. End Function
  2054.  
  2055.  
  2056. Function igpibbusstatus(ByVal id1 As Integer, ByVal request As Integer, result As Integer) As Integer
  2057.     Dim id As Integer
  2058.     Dim thisErrno As Integer
  2059.     Dim myerrstr As String * 60
  2060.     Dim tmp As Integer
  2061.  
  2062.     ' Call the function in the SICL DLL and check for errors
  2063.     id = vb_igpibbusstatus(id1, request, result)
  2064.     igpibbusstatus = id
  2065.     If id <> 0 Then
  2066.         thisErrno = vb_igeterrno()
  2067.         If thisErrno <> 0 Then
  2068.             Err.Clear    ' set default values in the error object
  2069.             ' set the error string and raise the error
  2070.             tmp = vb_igeterrstr(thisErrno, myerrstr)
  2071.             Err.Description = myerrstr
  2072.             Err.Raise (thisErrno) 'Raise the error
  2073.         End If
  2074.     End If
  2075.  
  2076. End Function
  2077.  
  2078. Function igpibppoll(ByVal id1 As Integer, result As Integer) As Integer
  2079.     Dim id As Integer
  2080.     Dim thisErrno As Integer
  2081.     Dim myerrstr As String * 60
  2082.     Dim tmp As Integer
  2083.  
  2084.     ' Call the function in the SICL DLL and check for errors
  2085.     id = vb_igpibppoll(id1, result)
  2086.     igpibppoll = id
  2087.     If id <> 0 Then
  2088.         thisErrno = vb_igeterrno()
  2089.         If thisErrno <> 0 Then
  2090.             Err.Clear    ' set default values in the error object
  2091.             ' set the error string and raise the error
  2092.             tmp = vb_igeterrstr(thisErrno, myerrstr)
  2093.             Err.Description = myerrstr
  2094.             Err.Raise (thisErrno) 'Raise the error
  2095.         End If
  2096.     End If
  2097.  
  2098. End Function
  2099.  
  2100. Function igpibppollconfig(ByVal id1 As Integer, ByVal cval As Integer) As Integer
  2101.     Dim id As Integer
  2102.     Dim thisErrno As Integer
  2103.     Dim myerrstr As String * 60
  2104.     Dim tmp As Integer
  2105.  
  2106.     ' Call the function in the SICL DLL and check for errors
  2107.     id = vb_igpibppollconfig(id1, cval)
  2108.     igpibppollconfig = id
  2109.     If id <> 0 Then
  2110.         thisErrno = vb_igeterrno()
  2111.         If thisErrno <> 0 Then
  2112.             Err.Clear    ' set default values in the error object
  2113.             ' set the error string and raise the error
  2114.             tmp = vb_igeterrstr(thisErrno, myerrstr)
  2115.             Err.Description = myerrstr
  2116.             Err.Raise (thisErrno) 'Raise the error
  2117.         End If
  2118.     End If
  2119.  
  2120. End Function
  2121.  
  2122. Function igpibppollresp(ByVal id1 As Integer, ByVal sval As Integer) As Integer
  2123.     Dim id As Integer
  2124.     Dim thisErrno As Integer
  2125.     Dim myerrstr As String * 60
  2126.     Dim tmp As Integer
  2127.  
  2128.     ' Call the function in the SICL DLL and check for errors
  2129.     id = vb_igpibppollresp(id1, sval)
  2130.     igpibppollresp = id
  2131.     If id <> 0 Then
  2132.         thisErrno = vb_igeterrno()
  2133.         If thisErrno <> 0 Then
  2134.             Err.Clear    ' set default values in the error object
  2135.             ' set the error string and raise the error
  2136.             tmp = vb_igeterrstr(thisErrno, myerrstr)
  2137.             Err.Description = myerrstr
  2138.             Err.Raise (thisErrno) 'Raise the error
  2139.         End If
  2140.     End If
  2141.  
  2142. End Function
  2143.  
  2144. Function igpibpassctl(ByVal id1 As Integer, ByVal busaddr As Integer) As Integer
  2145.     Dim id As Integer
  2146.     Dim thisErrno As Integer
  2147.     Dim myerrstr As String * 60
  2148.     Dim tmp As Integer
  2149.  
  2150.     ' Call the function in the SICL DLL and check for errors
  2151.     id = vb_igpibpassctl(id1, busaddr)
  2152.     igpibpassctl = id
  2153.     If id <> 0 Then
  2154.         thisErrno = vb_igeterrno()
  2155.         If thisErrno <> 0 Then
  2156.             Err.Clear    ' set default values in the error object
  2157.             ' set the error string and raise the error
  2158.             tmp = vb_igeterrstr(thisErrno, myerrstr)
  2159.             Err.Description = myerrstr
  2160.             Err.Raise (thisErrno) 'Raise the error
  2161.         End If
  2162.     End If
  2163.  
  2164. End Function
  2165.  
  2166. Function igpibrenctl(ByVal id1 As Integer, ByVal ren As Integer) As Integer
  2167.     Dim id As Integer
  2168.     Dim thisErrno As Integer
  2169.     Dim myerrstr As String * 60
  2170.     Dim tmp As Integer
  2171.  
  2172.     ' Call the function in the SICL DLL and check for errors
  2173.     id = vb_igpibrenctl(id1, ren)
  2174.     igpibrenctl = id
  2175.     If id <> 0 Then
  2176.         thisErrno = vb_igeterrno()
  2177.         If thisErrno <> 0 Then
  2178.             Err.Clear    ' set default values in the error object
  2179.             ' set the error string and raise the error
  2180.             tmp = vb_igeterrstr(thisErrno, myerrstr)
  2181.             Err.Description = myerrstr
  2182.             Err.Raise (thisErrno) 'Raise the error
  2183.         End If
  2184.     End If
  2185.  
  2186. End Function
  2187.  
  2188. Function igpibatnctl(ByVal id1 As Integer, ByVal atnval As Integer) As Integer
  2189.     Dim id As Integer
  2190.     Dim thisErrno As Integer
  2191.     Dim myerrstr As String * 60
  2192.     Dim tmp As Integer
  2193.  
  2194.     ' Call the function in the SICL DLL and check for errors
  2195.     id = vb_igpibatnctl(id1, atnval)
  2196.     igpibatnctl = id
  2197.     If id <> 0 Then
  2198.         thisErrno = vb_igeterrno()
  2199.         If thisErrno <> 0 Then
  2200.             Err.Clear    ' set default values in the error object
  2201.             ' set the error string and raise the error
  2202.             tmp = vb_igeterrstr(thisErrno, myerrstr)
  2203.             Err.Description = myerrstr
  2204.             Err.Raise (thisErrno) 'Raise the error
  2205.         End If
  2206.     End If
  2207.  
  2208. End Function
  2209.  
  2210. Function igpibsendcmd(ByVal id1 As Integer, ByVal buf As String, ByVal length As Integer) As Integer
  2211.     Dim id As Integer
  2212.     Dim thisErrno As Integer
  2213.     Dim myerrstr As String * 60
  2214.     Dim tmp As Integer
  2215.  
  2216.     ' Call the function in the SICL DLL and check for errors
  2217.     id = vb_igpibsendcmd(id1, buf, length)
  2218.     igpibsendcmd = id
  2219.     If id <> 0 Then
  2220.         thisErrno = vb_igeterrno()
  2221.         If thisErrno <> 0 Then
  2222.             Err.Clear    ' set default values in the error object
  2223.             ' set the error string and raise the error
  2224.             tmp = vb_igeterrstr(thisErrno, myerrstr)
  2225.             Err.Description = myerrstr
  2226.             Err.Raise (thisErrno) 'Raise the error
  2227.         End If
  2228.     End If
  2229.  
  2230. End Function
  2231.  
  2232. Function igpibllo(ByVal id1 As Integer) As Integer
  2233.     Dim id As Integer
  2234.     Dim thisErrno As Integer
  2235.     Dim myerrstr As String * 60
  2236.     Dim tmp As Integer
  2237.  
  2238.     ' Call the function in the SICL DLL and check for errors
  2239.     id = vb_igpibllo(id)
  2240.     igpibllo = id
  2241.     If id <> 0 Then
  2242.         thisErrno = vb_igeterrno()
  2243.         If thisErrno <> 0 Then
  2244.             Err.Clear    ' set default values in the error object
  2245.             ' set the error string and raise the error
  2246.             tmp = vb_igeterrstr(thisErrno, myerrstr)
  2247.             Err.Description = myerrstr
  2248.             Err.Raise (thisErrno) 'Raise the error
  2249.         End If
  2250.     End If
  2251.  
  2252. End Function
  2253.  
  2254. Function igpibbusaddr(ByVal id1 As Integer, ByVal busaddr As Integer) As Integer
  2255.     Dim id As Integer
  2256.     Dim thisErrno As Integer
  2257.     Dim myerrstr As String * 60
  2258.     Dim tmp As Integer
  2259.  
  2260.     ' Call the function in the SICL DLL and check for errors
  2261.     id = vb_igpibbusaddr(id1, busaddr)
  2262.     igpibbusaddr = id
  2263.     If id <> 0 Then
  2264.         thisErrno = vb_igeterrno()
  2265.         If thisErrno <> 0 Then
  2266.             Err.Clear    ' set default values in the error object
  2267.             ' set the error string and raise the error
  2268.             tmp = vb_igeterrstr(thisErrno, myerrstr)
  2269.             Err.Description = myerrstr
  2270.             Err.Raise (thisErrno) 'Raise the error
  2271.         End If
  2272.     End If
  2273.  
  2274. End Function
  2275.  
  2276. Function igpibgett1delay(ByVal id1 As Integer, delay As Integer) As Integer
  2277.     Dim id As Integer
  2278.     Dim thisErrno As Integer
  2279.     Dim myerrstr As String * 60
  2280.     Dim tmp As Integer
  2281.  
  2282.     ' Call the function in the SICL DLL and check for errors
  2283.     id = vb_igpibgett1delay(id1, delay)
  2284.     igpibgett1delay = id
  2285.     If id <> 0 Then
  2286.         thisErrno = vb_igeterrno()
  2287.         If thisErrno <> 0 Then
  2288.             Err.Clear    ' set default values in the error object
  2289.             ' set the error string and raise the error
  2290.             tmp = vb_igeterrstr(thisErrno, myerrstr)
  2291.             Err.Description = myerrstr
  2292.             Err.Raise (thisErrno) 'Raise the error
  2293.         End If
  2294.     End If
  2295.  
  2296. End Function
  2297.  
  2298. Function igpibsett1delay(ByVal id1 As Integer, ByVal delay As Integer) As Integer
  2299.     Dim id As Integer
  2300.     Dim thisErrno As Integer
  2301.     Dim myerrstr As String * 60
  2302.     Dim tmp As Integer
  2303.  
  2304.     ' Call the function in the SICL DLL and check for errors
  2305.     id = vb_igpibsett1delay(id1, delay)
  2306.     igpibsett1delay = id
  2307.     If id <> 0 Then
  2308.         thisErrno = vb_igeterrno()
  2309.         If thisErrno <> 0 Then
  2310.             Err.Clear    ' set default values in the error object
  2311.             ' set the error string and raise the error
  2312.             tmp = vb_igeterrstr(thisErrno, myerrstr)
  2313.             Err.Description = myerrstr
  2314.             Err.Raise (thisErrno) 'Raise the error
  2315.         End If
  2316.     End If
  2317.  
  2318. End Function
  2319.  
  2320.  
  2321. Function igpibpulseifc(ByVal id1 As Integer) As Integer
  2322.     Dim id As Integer
  2323.     Dim thisErrno As Integer
  2324.     Dim myerrstr As String * 60
  2325.     Dim tmp As Integer
  2326.  
  2327.     ' Call the function in the SICL DLL and check for errors
  2328.     id = vb_igpibpulseifc(id)
  2329.     igpibpulseifc = id
  2330.     If id <> 0 Then
  2331.         thisErrno = vb_igeterrno()
  2332.         If thisErrno <> 0 Then
  2333.             Err.Clear    ' set default values in the error object
  2334.             ' set the error string and raise the error
  2335.             tmp = vb_igeterrstr(thisErrno, myerrstr)
  2336.             Err.Description = myerrstr
  2337.             Err.Raise (thisErrno) 'Raise the error
  2338.         End If
  2339.     End If
  2340.  
  2341. End Function
  2342.  
  2343.  
  2344. Function igpioctrl(ByVal id1 As Integer, ByVal request As Integer, ByVal setting As Long) As Integer
  2345.     Dim id As Integer
  2346.     Dim thisErrno As Integer
  2347.     Dim myerrstr As String * 60
  2348.     Dim tmp As Integer
  2349.  
  2350.     ' Call the function in the SICL DLL and check for errors
  2351.     id = vb_igpioctrl(id1, request, setting)
  2352.     igpioctrl = id
  2353.     If id <> 0 Then
  2354.         thisErrno = vb_igeterrno()
  2355.         If thisErrno <> 0 Then
  2356.             Err.Clear    ' set default values in the error object
  2357.             ' set the error string and raise the error
  2358.             tmp = vb_igeterrstr(thisErrno, myerrstr)
  2359.             Err.Description = myerrstr
  2360.             Err.Raise (thisErrno) 'Raise the error
  2361.         End If
  2362.     End If
  2363.  
  2364. End Function
  2365.  
  2366.  
  2367. Function igpiostat(ByVal id1 As Integer, ByVal request As Integer, ByRef result As Long) As Integer
  2368.     Dim id As Integer
  2369.     Dim thisErrno As Integer
  2370.     Dim myerrstr As String * 60
  2371.     Dim tmp As Integer
  2372.  
  2373.     ' Call the function in the SICL DLL and check for errors
  2374.     id = vb_igpiostat(id1, request, result)
  2375.     igpiostat = id
  2376.     If id <> 0 Then
  2377.         thisErrno = vb_igeterrno()
  2378.         If thisErrno <> 0 Then
  2379.             Err.Clear    ' set default values in the error object
  2380.             ' set the error string and raise the error
  2381.             tmp = vb_igeterrstr(thisErrno, myerrstr)
  2382.             Err.Description = myerrstr
  2383.             Err.Raise (thisErrno) 'Raise the error
  2384.         End If
  2385.     End If
  2386.  
  2387. End Function
  2388.  
  2389.  
  2390. Function igpiosetwidth(ByVal id1 As Integer, ByVal width As Integer) As Integer
  2391.     Dim id As Integer
  2392.     Dim thisErrno As Integer
  2393.     Dim myerrstr As String * 60
  2394.     Dim tmp As Integer
  2395.  
  2396.     ' Call the function in the SICL DLL and check for errors
  2397.     id = vb_igpiosetwidth(id1, width)
  2398.     igpiosetwidth = id
  2399.     If id <> 0 Then
  2400.         thisErrno = vb_igeterrno()
  2401.         If thisErrno <> 0 Then
  2402.             Err.Clear    ' set default values in the error object
  2403.             ' set the error string and raise the error
  2404.             tmp = vb_igeterrstr(thisErrno, myerrstr)
  2405.             Err.Description = myerrstr
  2406.             Err.Raise (thisErrno) 'Raise the error
  2407.         End If
  2408.     End If
  2409.  
  2410. End Function
  2411.  
  2412.  
  2413. Function igpiogetwidth(ByVal id1 As Integer, ByRef width As Integer) As Integer
  2414.     Dim id As Integer
  2415.     Dim thisErrno As Integer
  2416.     Dim myerrstr As String * 60
  2417.     Dim tmp As Integer
  2418.  
  2419.     ' Call the function in the SICL DLL and check for errors
  2420.     id = vb_igpiogetwidth(id1, width)
  2421.     igpiogetwidth = id
  2422.     If id <> 0 Then
  2423.         thisErrno = vb_igeterrno()
  2424.         If thisErrno <> 0 Then
  2425.             Err.Clear    ' set default values in the error object
  2426.             ' set the error string and raise the error
  2427.             tmp = vb_igeterrstr(thisErrno, myerrstr)
  2428.             Err.Description = myerrstr
  2429.             Err.Raise (thisErrno) 'Raise the error
  2430.         End If
  2431.     End If
  2432.  
  2433. End Function
  2434.  
  2435. Function ilantimeout(ByVal id1 As Integer, ByVal tval As Long) As Integer
  2436.     Dim id As Integer
  2437.     Dim thisErrno As Integer
  2438.     Dim myerrstr As String * 60
  2439.     Dim tmp As Integer
  2440.  
  2441.     ' Call the function in the SICL DLL and check for errors
  2442.     id = vb_ilantimeout(id1, tval)
  2443.     ilantimeout = id
  2444.     If id <> 0 Then
  2445.         thisErrno = vb_igeterrno()
  2446.         If thisErrno <> 0 Then
  2447.             Err.Clear    ' set default values in the error object
  2448.             ' set the error string and raise the error
  2449.             tmp = vb_igeterrstr(thisErrno, myerrstr)
  2450.             Err.Description = myerrstr
  2451.             Err.Raise (thisErrno) 'Raise the error
  2452.         End If
  2453.     End If
  2454.  
  2455. End Function
  2456.  
  2457. Function ilangettimeout(ByVal id1 As Integer, tval As Long) As Integer
  2458.     Dim id As Integer
  2459.     Dim thisErrno As Integer
  2460.     Dim myerrstr As String * 60
  2461.     Dim tmp As Integer
  2462.  
  2463.     ' Call the function in the SICL DLL and check for errors
  2464.     id = vb_ilangettimeout(id1, tval)
  2465.     ilangettimeout = id
  2466.     If id <> 0 Then
  2467.         thisErrno = vb_igeterrno()
  2468.         If thisErrno <> 0 Then
  2469.             Err.Clear    ' set default values in the error object
  2470.             ' set the error string and raise the error
  2471.             tmp = vb_igeterrstr(thisErrno, myerrstr)
  2472.             Err.Description = myerrstr
  2473.             Err.Raise (thisErrno) 'Raise the error
  2474.         End If
  2475.     End If
  2476.  
  2477. End Function
  2478.  
  2479. Function imap(ByVal id1 As Integer, ByVal mapspace As Integer, ByVal pagestart As Integer, ByVal pagecnt As Integer, ByVal suggested As Long) As Long
  2480.     Dim id As Long
  2481.     Dim thisErrno As Integer
  2482.     Dim myerrstr As String * 60
  2483.     Dim tmp As Integer
  2484.  
  2485.     ' Force no error to be condition
  2486.     Call vb_icauseerr(id1, 0, 0)
  2487.  
  2488.     ' Call the function in the SICL DLL and check for errors
  2489.     id = vb_imap(id1, mapspace, pagestart, pagecnt, suggested)
  2490.     imap = id
  2491.     thisErrno = vb_igeterrno()
  2492.     If thisErrno <> 0 Then
  2493.         Err.Clear    ' set default values in the error object
  2494.         ' set the error string and raise the error
  2495.         tmp = vb_igeterrstr(thisErrno, myerrstr)
  2496.         Err.Description = myerrstr
  2497.         Err.Raise (thisErrno) 'Raise the error
  2498.     End If
  2499.  
  2500. End Function
  2501.  
  2502. Function imapx(ByVal id1 As Integer, ByVal mapspace As Integer, ByVal pagestart As Integer, ByVal pagecnt As Integer) As Long
  2503.     Dim retVal As Long
  2504.     Dim thisErrno As Integer
  2505.     Dim myerrstr As String * 60
  2506.     Dim tmp As Integer
  2507.  
  2508.     ' Force no error to be condition
  2509.     Call vb_icauseerr(id1, 0, 0)
  2510.  
  2511.     ' Call the function in the SICL DLL and check for errors
  2512.     retVal = vb_imapx(id1, mapspace, pagestart, pagecnt)
  2513.     imapx = retVal
  2514.     thisErrno = vb_igeterrno()
  2515.     If thisErrno <> 0 Then
  2516.         Err.Clear    ' set default values in the error object
  2517.         ' set the error string and raise the error
  2518.         tmp = vb_igeterrstr(thisErrno, myerrstr)
  2519.         Err.Description = myerrstr
  2520.         Err.Raise (thisErrno) 'Raise the error
  2521.     End If
  2522.  
  2523. End Function
  2524.  
  2525. Function iunmap(ByVal id1 As Integer, ByVal addr As Long, ByVal mapspace As Integer, ByVal pagestart As Integer, ByVal pagecnt As Integer) As Integer
  2526.     Dim id As Integer
  2527.     Dim thisErrno As Integer
  2528.     Dim myerrstr As String * 60
  2529.     Dim tmp As Integer
  2530.  
  2531.     ' Call the function in the SICL DLL and check for errors
  2532.     id = vb_iunmap(id1, addr, mapspace, pagestart, pagecnt)
  2533.     iunmap = id
  2534.     If id <> 0 Then
  2535.         thisErrno = vb_igeterrno()
  2536.         If thisErrno <> 0 Then
  2537.             Err.Clear    ' set default values in the error object
  2538.             ' set the error string and raise the error
  2539.             tmp = vb_igeterrstr(thisErrno, myerrstr)
  2540.             Err.Description = myerrstr
  2541.             Err.Raise (thisErrno) 'Raise the error
  2542.         End If
  2543.     End If
  2544.  
  2545. End Function
  2546.  
  2547. Function iunmapx(ByVal id1 As Integer, ByVal addr As Long, ByVal mapspace As Integer, ByVal pagestart As Integer, ByVal pagecnt As Integer) As Integer
  2548.     Dim retVal As Integer
  2549.     Dim thisErrno As Integer
  2550.     Dim myerrstr As String * 60
  2551.     Dim tmp As Integer
  2552.  
  2553.     ' Call the function in the SICL DLL and check for errors
  2554.     retVal = vb_iunmapx(id1, addr, mapspace, pagestart, pagecnt)
  2555.     iunmapx = retVal
  2556.     If retVal <> 0 Then
  2557.         thisErrno = vb_igeterrno()
  2558.         If thisErrno <> 0 Then
  2559.             Err.Clear    ' set default values in the error object
  2560.             ' set the error string and raise the error
  2561.             tmp = vb_igeterrstr(thisErrno, myerrstr)
  2562.             Err.Description = myerrstr
  2563.             Err.Raise (thisErrno) 'Raise the error
  2564.         End If
  2565.     End If
  2566.  
  2567. End Function
  2568.  
  2569. Function imapinfo(ByVal id1 As Integer, ByVal mapspace As Integer, numwindows As Integer, winsize As Integer) As Integer
  2570.     Dim id As Integer
  2571.     Dim thisErrno As Integer
  2572.     Dim myerrstr As String * 60
  2573.     Dim tmp As Integer
  2574.  
  2575.     ' Call the function in the SICL DLL and check for errors
  2576.     id = vb_imapinfo(id1, mapspace, numwindows, winsize)
  2577.     imapinfo = id
  2578.     If id <> 0 Then
  2579.         thisErrno = vb_igeterrno()
  2580.         If thisErrno <> 0 Then
  2581.             Err.Clear    ' set default values in the error object
  2582.             ' set the error string and raise the error
  2583.             tmp = vb_igeterrstr(thisErrno, myerrstr)
  2584.             Err.Description = myerrstr
  2585.             Err.Raise (thisErrno) 'Raise the error
  2586.         End If
  2587.     End If
  2588.  
  2589. End Function
  2590.  
  2591.  
  2592. Function ipokex8(ByVal siclId As Integer, ByVal mapHandle As Long, ByVal offset As Long, ByVal value As Byte) As Integer
  2593.     Dim retVal As Integer
  2594.     Dim thisErrno As Integer
  2595.     Dim myerrstr As String * 60
  2596.     Dim tmp As Integer
  2597.  
  2598.     ' Call the function in the SICL DLL and check for errors
  2599.     retVal = vb_ipokex8(siclId, mapHandle, offset, value)
  2600.     ipokex8 = retVal
  2601.     If retVal <> 0 Then
  2602.         thisErrno = vb_igeterrno()
  2603.         If thisErrno <> 0 Then
  2604.             Err.Clear    ' set default values in the error object
  2605.             ' set the error string and raise the error
  2606.             tmp = vb_igeterrstr(thisErrno, myerrstr)
  2607.             Err.Description = myerrstr
  2608.             Err.Raise (thisErrno) 'Raise the error
  2609.         End If
  2610.     End If
  2611. End Function
  2612.  
  2613. Function ipeekx8(ByVal siclId As Integer, ByVal mapHandle As Long, ByVal offset As Long, value As Byte) As Integer
  2614.     Dim retVal As Integer
  2615.     Dim thisErrno As Integer
  2616.     Dim myerrstr As String * 60
  2617.     Dim tmp As Integer
  2618.  
  2619.     ' Call the function in the SICL DLL and check for errors
  2620.     retVal = vb_ipeekx8(siclId, mapHandle, offset, value)
  2621.     ipeekx8 = retVal
  2622.     If retVal <> 0 Then
  2623.         thisErrno = vb_igeterrno()
  2624.         If thisErrno <> 0 Then
  2625.             Err.Clear    ' set default values in the error object
  2626.             ' set the error string and raise the error
  2627.             tmp = vb_igeterrstr(thisErrno, myerrstr)
  2628.             Err.Description = myerrstr
  2629.             Err.Raise (thisErrno) 'Raise the error
  2630.         End If
  2631.     End If
  2632. End Function
  2633.  
  2634. Function ipokex16(ByVal siclId As Integer, ByVal mapHandle As Long, ByVal offset As Long, ByVal value As Integer) As Integer
  2635.     Dim retVal As Integer
  2636.     Dim thisErrno As Integer
  2637.     Dim myerrstr As String * 60
  2638.     Dim tmp As Integer
  2639.  
  2640.     ' Call the function in the SICL DLL and check for errors
  2641.     retVal = vb_ipokex16(siclId, mapHandle, offset, value)
  2642.     ipokex16 = retVal
  2643.     If retVal <> 0 Then
  2644.         thisErrno = vb_igeterrno()
  2645.         If thisErrno <> 0 Then
  2646.             Err.Clear    ' set default values in the error object
  2647.             ' set the error string and raise the error
  2648.             tmp = vb_igeterrstr(thisErrno, myerrstr)
  2649.             Err.Description = myerrstr
  2650.             Err.Raise (thisErrno) 'Raise the error
  2651.         End If
  2652.     End If
  2653. End Function
  2654.  
  2655. Function ipeekx16(ByVal siclId As Integer, ByVal mapHandle As Long, ByVal offset As Long, value As Integer) As Integer
  2656.     Dim retVal As Integer
  2657.     Dim thisErrno As Integer
  2658.     Dim myerrstr As String * 60
  2659.     Dim tmp As Integer
  2660.  
  2661.     ' Call the function in the SICL DLL and check for errors
  2662.     retVal = vb_ipeekx16(siclId, mapHandle, offset, value)
  2663.     ipeekx16 = retVal
  2664.     If retVal <> 0 Then
  2665.         thisErrno = vb_igeterrno()
  2666.         If thisErrno <> 0 Then
  2667.             Err.Clear    ' set default values in the error object
  2668.             ' set the error string and raise the error
  2669.             tmp = vb_igeterrstr(thisErrno, myerrstr)
  2670.             Err.Description = myerrstr
  2671.             Err.Raise (thisErrno) 'Raise the error
  2672.         End If
  2673.     End If
  2674. End Function
  2675.  
  2676. Function ipokex32(ByVal siclId As Integer, ByVal mapHandle As Long, ByVal offset As Long, ByVal value As Long) As Integer
  2677.     Dim retVal As Integer
  2678.     Dim thisErrno As Integer
  2679.     Dim myerrstr As String * 60
  2680.     Dim tmp As Integer
  2681.  
  2682.     ' Call the function in the SICL DLL and check for errors
  2683.     retVal = vb_ipokex32(siclId, mapHandle, offset, value)
  2684.     ipokex32 = retVal
  2685.     If retVal <> 0 Then
  2686.         thisErrno = vb_igeterrno()
  2687.         If thisErrno <> 0 Then
  2688.             Err.Clear    ' set default values in the error object
  2689.             ' set the error string and raise the error
  2690.             tmp = vb_igeterrstr(thisErrno, myerrstr)
  2691.             Err.Description = myerrstr
  2692.             Err.Raise (thisErrno) 'Raise the error
  2693.         End If
  2694.     End If
  2695. End Function
  2696.  
  2697. Function ipeekx32(ByVal siclId As Integer, ByVal mapHandle As Long, ByVal offset As Long, value As Long) As Integer
  2698.     Dim retVal As Integer
  2699.     Dim thisErrno As Integer
  2700.     Dim myerrstr As String * 60
  2701.     Dim tmp As Integer
  2702.  
  2703.     ' Call the function in the SICL DLL and check for errors
  2704.     retVal = vb_ipeekx32(siclId, mapHandle, offset, value)
  2705.     ipeekx32 = retVal
  2706.     If retVal <> 0 Then
  2707.         thisErrno = vb_igeterrno()
  2708.         If thisErrno <> 0 Then
  2709.             Err.Clear    ' set default values in the error object
  2710.             ' set the error string and raise the error
  2711.             tmp = vb_igeterrstr(thisErrno, myerrstr)
  2712.             Err.Description = myerrstr
  2713.             Err.Raise (thisErrno) 'Raise the error
  2714.         End If
  2715.     End If
  2716. End Function
  2717.  
  2718. Function iblockmovex(ByVal siclId As Integer, ByVal srcHandle As Long, ByRef srcOffset As Variant, ByVal srcWidth As Integer, ByVal srcIncrement As Integer, ByVal destHandle As Long, ByRef destOffset As Variant, ByVal destWidth As Integer, ByVal destIncrement As Integer, ByVal count As Long, ByVal swap As Integer) As Integer
  2719.     Dim retVal As Integer
  2720.     Dim thisErrno As Integer
  2721.     Dim myerrstr As String * 60
  2722.     Dim tmp As Integer
  2723.  
  2724.     ' Call the function in the SICL DLL and check for errors
  2725.     retVal = vb_iblockmovex(siclId, srcHandle, srcOffset, srcWidth, srcIncrement, destHandle, destOffset, destWidth, destIncrement, count, swap)
  2726.     iblockmovex = retVal
  2727.     If retVal <> 0 Then
  2728.         thisErrno = vb_igeterrno()
  2729.         If thisErrno <> 0 Then
  2730.             Err.Clear    ' set default values in the error object
  2731.             ' set the error string and raise the error
  2732.             tmp = vb_igeterrstr(thisErrno, myerrstr)
  2733.             Err.Description = myerrstr
  2734.             Err.Raise (thisErrno) 'Raise the error
  2735.         End If
  2736.     End If
  2737. End Function
  2738.  
  2739. Function ibblockcopy(ByVal id1 As Integer, ByVal src As Long, ByVal dest As Long, ByVal cnt As Long) As Integer
  2740.     Dim id As Integer
  2741.     Dim thisErrno As Integer
  2742.     Dim myerrstr As String * 60
  2743.     Dim tmp As Integer
  2744.  
  2745.     ' Call the function in the SICL DLL and check for errors
  2746.     id = vb_ibblockcopy(id1, src, dest, cnt)
  2747.     ibblockcopy = id
  2748.     If id <> 0 Then
  2749.         thisErrno = vb_igeterrno()
  2750.         If thisErrno <> 0 Then
  2751.             Err.Clear    ' set default values in the error object
  2752.             ' set the error string and raise the error
  2753.             tmp = vb_igeterrstr(thisErrno, myerrstr)
  2754.             Err.Description = myerrstr
  2755.             Err.Raise (thisErrno) 'Raise the error
  2756.         End If
  2757.     End If
  2758.  
  2759. End Function
  2760.  
  2761. Function iwblockcopy(ByVal id1 As Integer, ByVal src As Long, ByVal dest As Long, ByVal cnt As Long, ByVal swap As Integer) As Integer
  2762.     Dim id As Integer
  2763.     Dim thisErrno As Integer
  2764.     Dim myerrstr As String * 60
  2765.     Dim tmp As Integer
  2766.  
  2767.     ' Call the function in the SICL DLL and check for errors
  2768.     id = vb_iwblockcopy(id1, src, dest, cnt, swap)
  2769.     iwblockcopy = id
  2770.     If id <> 0 Then
  2771.         thisErrno = vb_igeterrno()
  2772.         If thisErrno <> 0 Then
  2773.             Err.Clear    ' set default values in the error object
  2774.             ' set the error string and raise the error
  2775.             tmp = vb_igeterrstr(thisErrno, myerrstr)
  2776.             Err.Description = myerrstr
  2777.             Err.Raise (thisErrno) 'Raise the error
  2778.         End If
  2779.     End If
  2780.  
  2781. End Function
  2782.  
  2783. Function ilblockcopy(ByVal id1 As Integer, ByVal src As Long, ByVal dest As Long, ByVal cnt As Long, ByVal swap As Integer) As Integer
  2784.     Dim id As Integer
  2785.     Dim thisErrno As Integer
  2786.     Dim myerrstr As String * 60
  2787.     Dim tmp As Integer
  2788.  
  2789.     ' Call the function in the SICL DLL and check for errors
  2790.     id = vb_ilblockcopy(id1, src, dest, cnt, swap)
  2791.     ilblockcopy = id
  2792.     If id <> 0 Then
  2793.         thisErrno = vb_igeterrno()
  2794.         If thisErrno <> 0 Then
  2795.             Err.Clear    ' set default values in the error object
  2796.             ' set the error string and raise the error
  2797.             tmp = vb_igeterrstr(thisErrno, myerrstr)
  2798.             Err.Description = myerrstr
  2799.             Err.Raise (thisErrno) 'Raise the error
  2800.         End If
  2801.     End If
  2802.  
  2803. End Function
  2804.  
  2805. Function ibpushfifo(ByVal id1 As Integer, ByVal src As Long, ByVal fifo As Long, ByVal cnt As Long) As Integer
  2806.     Dim id As Integer
  2807.     Dim thisErrno As Integer
  2808.     Dim myerrstr As String * 60
  2809.     Dim tmp As Integer
  2810.  
  2811.     ' Call the function in the SICL DLL and check for errors
  2812.     id = vb_ibpushfifo(id1, src, fifo, cnt)
  2813.     ibpushfifo = id
  2814.     If id <> 0 Then
  2815.         thisErrno = vb_igeterrno()
  2816.         If thisErrno <> 0 Then
  2817.             Err.Clear    ' set default values in the error object
  2818.             ' set the error string and raise the error
  2819.             tmp = vb_igeterrstr(thisErrno, myerrstr)
  2820.             Err.Description = myerrstr
  2821.             Err.Raise (thisErrno) 'Raise the error
  2822.         End If
  2823.     End If
  2824.  
  2825. End Function
  2826.  
  2827. Function iwpushfifo(ByVal id1 As Integer, ByVal src As Long, ByVal fifo As Long, ByVal cnt As Long, ByVal swap As Integer) As Integer
  2828.     Dim id As Integer
  2829.     Dim thisErrno As Integer
  2830.     Dim myerrstr As String * 60
  2831.     Dim tmp As Integer
  2832.  
  2833.     ' Call the function in the SICL DLL and check for errors
  2834.     id = vb_iwpushfifo(id1, src, fifo, cnt, swap)
  2835.     iwpushfifo = id
  2836.     If id <> 0 Then
  2837.         thisErrno = vb_igeterrno()
  2838.         If thisErrno <> 0 Then
  2839.             Err.Clear    ' set default values in the error object
  2840.             ' set the error string and raise the error
  2841.             tmp = vb_igeterrstr(thisErrno, myerrstr)
  2842.             Err.Description = myerrstr
  2843.             Err.Raise (thisErrno) 'Raise the error
  2844.         End If
  2845.     End If
  2846.  
  2847. End Function
  2848.  
  2849. Function ilpushfifo(ByVal id1 As Integer, ByVal src As Long, ByVal fifo As Long, ByVal cnt As Long, ByVal swap As Integer) As Integer
  2850.     Dim id As Integer
  2851.     Dim thisErrno As Integer
  2852.     Dim myerrstr As String * 60
  2853.     Dim tmp As Integer
  2854.  
  2855.     ' Call the function in the SICL DLL and check for errors
  2856.     id = vb_ilpushfifo(id1, src, fifo, cnt, swap)
  2857.     ilpushfifo = id
  2858.     If id <> 0 Then
  2859.         thisErrno = vb_igeterrno()
  2860.         If thisErrno <> 0 Then
  2861.             Err.Clear    ' set default values in the error object
  2862.             ' set the error string and raise the error
  2863.             tmp = vb_igeterrstr(thisErrno, myerrstr)
  2864.             Err.Description = myerrstr
  2865.             Err.Raise (thisErrno) 'Raise the error
  2866.         End If
  2867.     End If
  2868.  
  2869. End Function
  2870.  
  2871. Function ibpopfifo(ByVal id1 As Integer, ByVal fifo As Long, ByVal dest As Long, ByVal cnt As Long) As Integer
  2872.     Dim id As Integer
  2873.     Dim thisErrno As Integer
  2874.     Dim myerrstr As String * 60
  2875.     Dim tmp As Integer
  2876.  
  2877.     ' Call the function in the SICL DLL and check for errors
  2878.     id = vb_ibpopfifo(id1, fifo, dest, cnt)
  2879.     ibpopfifo = id
  2880.     If id <> 0 Then
  2881.         thisErrno = vb_igeterrno()
  2882.         If thisErrno <> 0 Then
  2883.             Err.Clear    ' set default values in the error object
  2884.             ' set the error string and raise the error
  2885.             tmp = vb_igeterrstr(thisErrno, myerrstr)
  2886.             Err.Description = myerrstr
  2887.             Err.Raise (thisErrno) 'Raise the error
  2888.         End If
  2889.     End If
  2890.  
  2891. End Function
  2892.  
  2893. Function iwpopfifo(ByVal id1 As Integer, ByVal fifo As Long, ByVal dest As Long, ByVal cnt As Long, ByVal swap As Integer) As Integer
  2894.     Dim id As Integer
  2895.     Dim thisErrno As Integer
  2896.     Dim myerrstr As String * 60
  2897.     Dim tmp As Integer
  2898.  
  2899.     ' Call the function in the SICL DLL and check for errors
  2900.     id = vb_iwpopfifo(id1, fifo, dest, cnt, swap)
  2901.     iwpopfifo = id
  2902.     If id <> 0 Then
  2903.         thisErrno = vb_igeterrno()
  2904.         If thisErrno <> 0 Then
  2905.             Err.Clear    ' set default values in the error object
  2906.             ' set the error string and raise the error
  2907.             tmp = vb_igeterrstr(thisErrno, myerrstr)
  2908.             Err.Description = myerrstr
  2909.             Err.Raise (thisErrno) 'Raise the error
  2910.         End If
  2911.     End If
  2912.  
  2913. End Function
  2914.  
  2915. Function ilpopfifo(ByVal id1 As Integer, ByVal fifo As Long, ByVal dest As Long, ByVal cnt As Long, ByVal swap As Integer) As Integer
  2916.     Dim id As Integer
  2917.     Dim thisErrno As Integer
  2918.     Dim myerrstr As String * 60
  2919.     Dim tmp As Integer
  2920.  
  2921.     ' Call the function in the SICL DLL and check for errors
  2922.     id = vb_ilpopfifo(id1, fifo, dest, cnt, swap)
  2923.     ilpopfifo = id
  2924.     If id <> 0 Then
  2925.         thisErrno = vb_igeterrno()
  2926.         If thisErrno <> 0 Then
  2927.             Err.Clear    ' set default values in the error object
  2928.             ' set the error string and raise the error
  2929.             tmp = vb_igeterrstr(thisErrno, myerrstr)
  2930.             Err.Description = myerrstr
  2931.             Err.Raise (thisErrno) 'Raise the error
  2932.         End If
  2933.     End If
  2934.  
  2935. End Function
  2936.  
  2937.  
  2938. Function siclcleanup() As Integer
  2939.     Dim id As Integer
  2940.     Dim thisErrno As Integer
  2941.     Dim myerrstr As String * 60
  2942.     Dim tmp As Integer
  2943.  
  2944.     ' Call the function in the SICL DLL and check for errors
  2945.     id = vb__siclcleanup()
  2946.     siclcleanup = id
  2947.     If id <> 0 Then
  2948.         thisErrno = vb_igeterrno()
  2949.         If thisErrno <> 0 Then
  2950.             Err.Clear    ' set default values in the error object
  2951.             ' set the error string and raise the error
  2952.             tmp = vb_igeterrstr(thisErrno, myerrstr)
  2953.             Err.Description = myerrstr
  2954.             Err.Raise (thisErrno) 'Raise the error
  2955.         End If
  2956.     End If
  2957.  
  2958. End Function
  2959.  
  2960.  
  2961. Function setsiclyield(ByVal yield_option As Integer) As Integer
  2962.     Dim id As Integer
  2963.     Dim thisErrno As Integer
  2964.     Dim myerrstr As String * 60
  2965.     Dim tmp As Integer
  2966.  
  2967.     ' Call the function in the SICL DLL and check for errors
  2968.     id = vb__setsiclyield(yield_option)
  2969.     setsiclyield = id
  2970.     If id <> 0 Then
  2971.         thisErrno = vb_igeterrno()
  2972.         If thisErrno <> 0 Then
  2973.             Err.Clear    ' set default values in the error object
  2974.             ' set the error string and raise the error
  2975.             tmp = vb_igeterrstr(thisErrno, myerrstr)
  2976.             Err.Description = myerrstr
  2977.             Err.Raise (thisErrno) 'Raise the error
  2978.         End If
  2979.     End If
  2980.  
  2981. End Function
  2982.  
  2983.  
  2984. Sub ibpoke(ByVal addr As Long, ByVal value As Byte)
  2985.     Dim thisErrno As Integer
  2986.     Dim myerrstr As String * 60
  2987.     Dim tmp As Integer
  2988.  
  2989.     ' Force no error to be condition
  2990.     Call vb_icauseerr(id1, 0, 0)
  2991.  
  2992.     ' Call the function in the SICL DLL
  2993.     Call vb_ibpoke(addr, value)
  2994.  
  2995.     thisErrno = vb_igeterrno()
  2996.     If thisErrno <> 0 Then
  2997.         Err.Clear    ' set default values in the error object
  2998.         ' set the error string and raise the error
  2999.         tmp = vb_igeterrstr(thisErrno, myerrstr)
  3000.         Err.Description = myerrstr
  3001.         Err.Raise (thisErrno) 'Raise the error
  3002.     End If
  3003.  
  3004. End Sub
  3005.  
  3006.  
  3007. Sub iwpoke(ByVal addr As Long, ByVal value As Integer)
  3008.     Dim thisErrno As Integer
  3009.     Dim myerrstr As String * 60
  3010.     Dim tmp As Integer
  3011.  
  3012.     ' Force no error to be condition
  3013.     Call vb_icauseerr(id1, 0, 0)
  3014.  
  3015.     ' Call the function in the SICL DLL
  3016.     Call vb_iwpoke(addr, value)
  3017.  
  3018.     thisErrno = vb_igeterrno()
  3019.     If thisErrno <> 0 Then
  3020.         Err.Clear    ' set default values in the error object
  3021.         ' set the error string and raise the error
  3022.         tmp = vb_igeterrstr(thisErrno, myerrstr)
  3023.         Err.Description = myerrstr
  3024.         Err.Raise (thisErrno) 'Raise the error
  3025.     End If
  3026.  
  3027. End Sub
  3028.  
  3029. Sub ilpoke(ByVal addr As Long, ByVal value As Long)
  3030.     Dim thisErrno As Integer
  3031.     Dim myerrstr As String * 60
  3032.     Dim tmp As Integer
  3033.  
  3034.     ' Force no error to be condition
  3035.     Call vb_icauseerr(id1, 0, 0)
  3036.  
  3037.     ' Call the function in the SICL DLL
  3038.     Call vb_ilpoke(addr, value)
  3039.  
  3040.     thisErrno = vb_igeterrno()
  3041.     If thisErrno <> 0 Then
  3042.         Err.Clear    ' set default values in the error object
  3043.         ' set the error string and raise the error
  3044.         tmp = vb_igeterrstr(thisErrno, myerrstr)
  3045.         Err.Description = myerrstr
  3046.         Err.Raise (thisErrno) 'Raise the error
  3047.     End If
  3048.  
  3049. End Sub
  3050.  
  3051. Function ibpeek(ByVal addr As Long) As Byte
  3052.     Dim id As Byte
  3053.  
  3054.     ' Call the function in the SICL DLL and check for errors
  3055.     id = vb_ibpeek(addr)
  3056.     ibpeek = id
  3057.  
  3058. End Function
  3059.  
  3060. Function iwpeek(ByVal addr As Long) As Integer
  3061.     Dim id As Integer
  3062.  
  3063.     ' Call the function in the SICL DLL and check for errors
  3064.     id = vb_iwpeek(addr)
  3065.     iwpeek = id
  3066.  
  3067. End Function
  3068.  
  3069. Function ilpeek(ByVal addr As Long) As Long
  3070.     Dim id As Long
  3071.  
  3072.     ' Call the function in the SICL DLL and check for errors
  3073.     id = vb_ilpeek(addr)
  3074.     ilpeek = id
  3075.  
  3076. End Function
  3077.  
  3078.  
  3079. ' This function truncates a string so that all characters
  3080. ' following a carriage return or linefeed character are
  3081. ' removed.  The truncated string is then returned.
  3082. Function strip_crlf(szString As String) As String
  3083.    Dim crlfpos As Integer
  3084.  
  3085.    crlfpos = InStr(szString, Chr$(13))
  3086.    If crlfpos Then
  3087.      szString = Left(szString, crlfpos - 1)
  3088.    End If
  3089.    crlfpos = InStr(szString, Chr$(10))
  3090.    If crlfpos Then
  3091.      szString = Left(szString, crlfpos - 1)
  3092.    End If
  3093.  
  3094.    strip_crlf = szString
  3095. End Function
  3096.  
  3097. Function icmd(ByVal id1 As Integer, ByVal cmd As Long, ByVal datalen As Integer, ByVal datawidth As Integer, ByRef pdata As Long) As Integer
  3098.     Dim id As Integer
  3099.     Dim thisErrno As Integer
  3100.     Dim myerrstr As String * 60
  3101.     Dim tmp As Integer
  3102.  
  3103.     ' Call the function in the SICL DLL and check for errors
  3104.     id = vb_icmd(id1, cmd, datalen, datawidth, pdata)
  3105.     icmd = id
  3106.     If id <> 0 Then
  3107.         thisErrno = vb_igeterrno()
  3108.         If thisErrno <> 0 Then
  3109.             Err.Clear    ' set default values in the error object
  3110.             ' set the error string and raise the error
  3111.             tmp = vb_igeterrstr(thisErrno, myerrstr)
  3112.             Err.Description = myerrstr
  3113.             Err.Raise (thisErrno) 'Raise the error
  3114.         End If
  3115.     End If
  3116.  
  3117. End Function
  3118.  
  3119. #If Win32 Then
  3120. Public Function isprintf(ByRef s As String, ByVal fmt As String, ParamArray vararg() As Variant) As Integer
  3121.     Dim retVal As Integer
  3122.     Dim thisErrno As Integer
  3123.     Dim myerrstr As String * 60
  3124.     Dim tmp As Integer
  3125.     If (UBound(vararg) <> -1) Then
  3126.        ReDim va(LBound(vararg) To UBound(vararg)) As Variant
  3127.     Else
  3128.        ReDim va(0 To 0) As Variant
  3129.        va(0) = 0
  3130.     End If
  3131.     
  3132.     ' Force no error to be condition
  3133.     Call vb_icauseerr(0, 0, 0)
  3134.     
  3135.     For i = LBound(vararg) To UBound(vararg)
  3136.        va(i) = vararg(i)
  3137.     Next i
  3138.  
  3139.     ' Call the function in the SICL DLL and check for errors
  3140.     retVal = vb_iprint(1, 0, s, ByVal fmt, va)
  3141.     
  3142.     isprintf = retVal
  3143.  
  3144.     thisErrno = vb_igeterrno()
  3145.     If thisErrno <> 0 Then
  3146.         Err.Clear    ' set default values in the error object
  3147.         ' set the error string and raise the error
  3148.         tmp = vb_igeterrstr(thisErrno, myerrstr)
  3149.         Err.Description = myerrstr
  3150.         Err.Raise (thisErrno) 'Raise the error
  3151.     End If
  3152.  
  3153. End Function
  3154.  
  3155. Public Function iprintf(ByRef id As Integer, ByVal fmt As String, ParamArray vararg() As Variant) As Integer
  3156.     Dim retVal As Integer
  3157.     Dim thisErrno As Integer
  3158.     Dim myerrstr As String * 60
  3159.     Dim tmp As Integer
  3160.     If (UBound(vararg) <> -1) Then
  3161.        ReDim va(LBound(vararg) To UBound(vararg)) As Variant
  3162.     Else
  3163.        ReDim va(0 To 0) As Variant
  3164.        va(0) = 0
  3165.     End If
  3166.     
  3167.     ' Force no error to be condition
  3168.     Call vb_icauseerr(0, 0, 0)
  3169.     
  3170.     For i = LBound(vararg) To UBound(vararg)
  3171.        va(i) = vararg(i)
  3172.     Next i
  3173.  
  3174.     ' Call the function in the SICL DLL and check for errors
  3175.     retVal = vb_iprint(2, id, 0, ByVal fmt, va)
  3176.     
  3177.     iprintf = retVal
  3178.  
  3179.     thisErrno = vb_igeterrno()
  3180.     If thisErrno <> 0 Then
  3181.         Err.Clear    ' set default values in the error object
  3182.         ' set the error string and raise the error
  3183.         tmp = vb_igeterrstr(thisErrno, myerrstr)
  3184.         Err.Description = myerrstr
  3185.         Err.Raise (thisErrno) 'Raise the error
  3186.     End If
  3187.  
  3188. End Function
  3189.  
  3190. Public Function isscanf(ByVal s As String, ByVal fmt As String, Optional va1 As Variant, Optional va2 As Variant, Optional va3 As Variant, Optional va4 As Variant, Optional va5 As Variant, Optional va6 As Variant, Optional va7 As Variant, Optional va8 As Variant, Optional va9 As Variant, Optional va10 As Variant) As Integer
  3191.     Dim retVal As Integer
  3192.     Dim thisErrno As Integer
  3193.     Dim myerrstr As String * 60
  3194.     Dim tmp As Integer
  3195.     
  3196.     ' Force no error to be condition
  3197.     Call vb_icauseerr(0, 0, 0)
  3198.     
  3199.     ' Call the function in the SICL DLL and check for errors
  3200.     retVal = vb_iscan(3, 0, ByVal s, ByVal fmt, va1, va2, va3, va4, va5, va6, va7, va8, va9, va10)
  3201.     
  3202.     isscanf = retVal
  3203.  
  3204.     thisErrno = vb_igeterrno()
  3205.     If thisErrno <> 0 Then
  3206.         Err.Clear    ' set default values in the error object
  3207.         ' set the error string and raise the error
  3208.         tmp = vb_igeterrstr(thisErrno, myerrstr)
  3209.         Err.Description = myerrstr
  3210.         Err.Raise (thisErrno) 'Raise the error
  3211.     End If
  3212.  
  3213. End Function
  3214.  
  3215. Public Function iscanf(ByRef id As Integer, ByVal fmt As String, Optional va1 As Variant, Optional va2 As Variant, Optional va3 As Variant, Optional va4 As Variant, Optional va5 As Variant, Optional va6 As Variant, Optional va7 As Variant, Optional va8 As Variant, Optional va9 As Variant, Optional va10 As Variant) As Integer
  3216.     Dim retVal As Integer
  3217.     Dim thisErrno As Integer
  3218.     Dim myerrstr As String * 60
  3219.     Dim tmp As Integer
  3220.     
  3221.     ' Force no error to be condition
  3222.     Call vb_icauseerr(0, 0, 0)
  3223.    
  3224.     ' Call the function in the SICL DLL and check for errors
  3225.     retVal = vb_iscan(4, id, 0, ByVal fmt, va1, va2, va3, va4, va5, va6, va7, va8, va9, va10)
  3226.     
  3227.     iscanf = retVal
  3228.  
  3229.     thisErrno = vb_igeterrno()
  3230.     If thisErrno <> 0 Then
  3231.         Err.Clear    ' set default values in the error object
  3232.         ' set the error string and raise the error
  3233.         tmp = vb_igeterrstr(thisErrno, myerrstr)
  3234.         Err.Description = myerrstr
  3235.         Err.Raise (thisErrno) 'Raise the error
  3236.     End If
  3237.  
  3238. End Function
  3239.  
  3240. #End If
  3241.     
  3242.